[ale] [OT] - SQL question and fastest sorting algorithm

Jason Vinson jason.vinson at mindspring.com
Fri Apr 25 08:35:54 EDT 2003


whoops... fixed sql query:

> select create_time, info from table_notes where case2notes = 12345 or 
> subcase2notes in (select objid from table subcase where subcase2case = 
> > 12345)


On Friday, April 25, 2003, at 08:30  AM, Jason Vinson wrote:

> first a question for the DBA/SQL coders out there:
>
> I have a table that i want to grab data out of by referencing two 
> separate keys as follows:
>
> select create_time, info from table_notes where case2notes = 12345 or 
> subcase2notes in (select from table subcase where subcase2case = > 12345)
>
> From what i understand, you can't do a join on the same table with two 
> separate keys, and this method is horribly inefficient (read that as 
> it kills my schema browser to even run that command) and i wanted to 
> see if there was a better way to request this data, or if i would be 
> better off just getting all the data from separate queries and then 
> using a sorting algorithm by date.
>
> which leads me to my second question:  what's the most efficient 
> sorting algorithm by most standards?
>
> TIA,
> Jason
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list