Storing Greek Symbols in SQL Server 2000

Hi, Does anybody knows how to store greek symbols (alpha, gamma, delta) in SQL Server 2000 table?

Thanks, Ashesh

more ▼

asked Dec 11, 2009 at 03:52 AM in Default

Ashesh gravatar image

24 2 2 2

Can you give us the DDL for your tabel? I think you might need to set the proper code page/collation for this table.
Dec 11, 2009 at 12:20 PM Steve Jones - Editor ♦♦
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

EDIT: Replace previous code snippets with 1 complete snippet using a table variable.

You should be able to do this using a Greek collation for an nvarchar column.

I found this page with Greek characters: http://ancienthistory.about.com/od/greeklanguage/a/ASCIIGreek.htm

DECLARE @GreekAlphabet TABLE
    english nchar(1) not null,
    greek nchar(1) COLLATE Greek_BIN not null,
    greek_name varchar(10) not null

INSERT INTO @GreekAlphabet (english, greek, greek_name)
    SELECT N'A', N'Α', 'ALPHA'
    SELECT N'a', N'α', 'alpha'
    SELECT N'B', N'Β', 'BETA'
    SELECT N'b', N'β', 'beta'
    SELECT N'G', N'Γ', 'GAMMA'
    SELECT N'g', N'γ', 'gamma'
    SELECT N'D', N'Δ', 'DELTA'
    SELECT N'd', N'δ', 'delta'

SELECT * FROM @GreekAlphabet


english greek greek_name A Α ALPHA a α alpha B Β BETA b β beta D Δ DELTA d δ delta G Γ GAMMA g γ gamma 
more ▼

answered Dec 11, 2009 at 04:13 AM

Tom Staab gravatar image

Tom Staab
5.8k 6 8 10

This didn't work. e.g. when I want to store Δ (i.e. Greek Delta) should my SQL should be INSERT INTO MyTable (greek) VALUES(N'Δ') or INSERT INTO MyTable (greek) VALUES(N'&#916')
Dec 11, 2009 at 06:31 AM Ashesh
Either way it don't work for me.
Dec 11, 2009 at 06:32 AM Ashesh
Try the new code I just posted. It works in SQL Server 2008. I don't have 2000, but I don't see why it wouldn't work there.
Dec 11, 2009 at 10:17 AM Tom Staab
Thanks Tom, This has worked. Thanks again Ashesh
Dec 22, 2009 at 01:30 PM Ashesh
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Dec 11, 2009 at 03:52 AM

Seen: 1998 times

Last Updated: Dec 11, 2009 at 03:52 AM