Hi team, I have an issue with order by clause.. plz suggest me the query..
Thanks in advance... -Srinivas.
-----------************************************-------------- INPUT -----------************************************-------------- CREATE TABLE T ( C1 VARCHAR(20),C2 VARCHAR(20))
INSERT INTO T VALUES ('ALFABET','A') INSERT INTO T VALUES ('ALFABET','B') INSERT INTO T VALUES ('ALFABET','C')
INSERT INTO T VALUES ('NUBER','1') INSERT INTO T VALUES ('NUBER','2') INSERT INTO T VALUES ('NUBER','3') INSERT INTO T VALUES ('NUBER','4')
INSERT INTO T VALUES ('SYMBOL','+') INSERT INTO T VALUES ('SYMBOL','-')
-----------************************************-------------- OUTPUT -----------************************************-------------- Now the output should be as follows...
NUBER 1 NUBER 2 NUBER 3 NUBER 4 ALFABET A ALFABET B ALFABET C SYMBOL + SYMBOL -
If there are other groups, what is the rule that should be followed? If it is all numeric followed by all alphas followed by all symbols, then use the approach Rob Volk had described in the duplicate issue you posted: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=180127
If it is some other rules that need to be followed for ordering, can you describe the rule?
BTW, people who run this forum look upon duplicate posts advise against duplicate posting - for avoiding fragmentation of replies, for avoiding multiple people wasting their time trying to solve the same problem etc.
If there are other groups, what is the rule that should be followed? If it is all numeric followed by all alphas followed by all symbols, then use the approach Rob Volk had described in the duplicate issue you posted: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=180127
If it is some other rules that need to be followed for ordering, can you describe the rule?
BTW, people who run this forum look upon duplicate posts advise against duplicate posting - for avoiding fragmentation of replies, for avoiding multiple people wasting their time trying to solve the same problem etc.
Hi sunitabeck, Sorry for duplicate posting..Actually I posted this first in 2000 forum.After that I realized that there are no frequent postings in now a days.So I created again in this forum..