473,241 Members | 1,930 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,241 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 5320
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.