Posted on 2007-11-24 11:02:50-08 by softengg
using sort order with intersect clause
hi, i am using SQLite 3 as my DB, and i want to know, how we can use Order by ASC and RANDOM() after a INTERSECT and UNION clause? Suppose, my query is as follows : Select Names from Table A where ID = '1' INTERSECT Select Names from Table A where where ID ='2' INTERSECT Select Names from Table A where where ID='5', etc..... The above query is selecting "Names" from the same table (Table A, in which ID=1 contains so many names, ID=2 contains so many another names, etc) But how we can get the result Names in order by asc and by random().....? And if the table contains Upper Case and Lowercase names, how can also sort that all? how we can use ORDER BY and RANDOM() in the above slite query ???? pls help me...........................
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.