x

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

avatar image

Ashesh
24 2 2 4

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' UNION SELECT N'a', N'α', 'alpha' UNION SELECT N'B', N'Β', 'BETA' UNION SELECT N'b', N'β', 'beta' UNION SELECT N'G', N'Γ', 'GAMMA' UNION SELECT N'g', N'γ', 'gamma' UNION SELECT N'D', N'Δ', 'DELTA' UNION SELECT N'd', N'δ', 'delta'

SELECT * FROM @GreekAlphabet

Results:

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

avatar image

Tom Staab ♦
14.5k 7 14 19

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'Δ')

Dec 11, 2009 at 06:31 AM 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

By RSS:

Answers

Answers and Comments

SQL Server Central

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

Topics:

x1069

asked: Dec 11, 2009 at 03:52 AM

Seen: 2513 times

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

Copyright 2016 Redgate Software. Privacy Policy