473,325 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Greek Alphabet Ordering

Got a tough one here for you SQL junkies.

I'm working on a website (in ASP) for a national greek/college
organization. All it's college chapters have greek chapter names,
i.e. Alpha Chapter, Delta Chapter, Delta Iota Chapter, Gamma Phi
Chapter, ect. ect.

I need the SQL to return the chapters in greek alphabet ordering. See
below:
1. Alpha
2. Beta
3. Gamma
4. Delta
5. Epsilon
6. Zeta
7. Eta
8. Theta
9. Iota
10. Kappa
11. Lambda
12. Mu
13. Nu
14. Xi
15. Omicron
16. Pi
17. Rho
18. Sigma
19. Tau
20. Upsilon
21. Phi
22. Chi
23. Psi
24. Omega

Basically I need a way to specify this type of presedence for wording
and keep all the results in greek-letter order, so Sigma Upsilon comes
before Sigma Tau, and so on.

Also, to make it even more difficult, these are written words, not the
actual greek symbols like α β etc. Everything is stored in
the DB as Alpha Beta Whateva Chapter.

Hopefully some of you SQL junkies will be able to help on this one ;)
Jul 20 '05 #1
2 5329
Create a table with the required mapping, i.e the greek letter and its
precedence.

CREATE TABLE Mappings (
Greek VARCHAR(10) NOT NULL,
Precedence INT NOT NULL PRIMARY KEY) ;

Now, you can use this table in your queries with a join on the Greek column
& then sort the resultset by precedence.

SELECT *
FROM tbl
INNER JOIN Mappings
ON tbl.Greekletter = Mappings.Greek
ORDER BY Mappings.Precedence ;

--
- Anith
( Please reply to newsgroups only )
Jul 20 '05 #2
I'm pretty sure that this won't work. I believe it assumes that the
field name consists only of one greek letter, and that the precendence
(sort_order) will be matched along with the mapping letter by letter
for each record in the column. This would have been great, except the
records in the CHAPTERS table are more like: 'Gamma Rho Chapter', 'Xi
Chapter', 'Sigma Epsilon Chapter', ect.

I do appreciate the attempt though.

"Anith Sen" <an***@bizdatasolutions.com> wrote in message news:<T8*********************@bgtnsc04-news.ops.worldnet.att.net>...
Create a table with the required mapping, i.e the greek letter and its
precedence.

CREATE TABLE Mappings (
Greek VARCHAR(10) NOT NULL,
Precedence INT NOT NULL PRIMARY KEY) ;

Now, you can use this table in your queries with a join on the Greek column
& then sort the resultset by precedence.

SELECT *
FROM tbl
INNER JOIN Mappings
ON tbl.Greekletter = Mappings.Greek
ORDER BY Mappings.Precedence ;

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sharma | last post by:
Hi, I have a application which shows the content in two different languages English and Russian. It has Languge folder where in it maintains seperate language folders named English and Russian....
27
by: alexdoulou | last post by:
Hello, I am trying to type greek fonts into common html forms on the Internet explorer but erroneous text is being typed instead of clear greek. Greek language pack is installed correctly....
9
by: PAN | last post by:
I need some guidance here I've written this HTML code using the Windows Notebook: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EL"> <html> <head> <title>This is a Greek language title ->...
4
by: Kiki | last post by:
Hello, I'm trying to find a way to display text in greek or cyrillic in a .NET page using text stored in XML format. I'm getting the greek words displayed like this: "Διάφορα". I'm no expert but...
5
by: Stefan Krah | last post by:
Hello, I am currently writing code where it is convenient to convert char to int . The conversion function relies on a character set with contiguous alphabets. int set_mesg(Key *key, char...
8
by: Jack Addington | last post by:
I want to scroll through the alphabet in order to scroll some data to the closest name that starts with a letter. If the user hits the H button then it should scroll to the letter closest to H. ...
1
by: interuser | last post by:
Hi I have a web app that has a webpage on which there is a textbox and a submit button. if I type greek and press submit, the greek does not go through to the webserver. If I type greek and...
6
by: pros | last post by:
Hi, I am new to learning how to program in JavaScript and want to design a program in JavaScript that will allow a user to run a Classical Greek vocabulary flashcard program on my web page. My...
6
by: starman | last post by:
Hi all, I'm having trouble trying to enter/retrieve Greek characters. I have an astronomical dbase in MySQL. As you may know, lots of sky objects have Greek letter names (alpha Centauri, etc) but I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.