HERE IS UR SOLUTION---- the query for this should be -- *SELECT ID,TEXT FROM ((SELECT a.CID AS ID, a.ItemName AS text FROM customlists a) UNION( SELECT b.GID AS ID, b.ItemName AS text FROM globallists b)) c ORDER BY c.TEXT; *
Result may vary while we use UNION ALL instead of UNION. Regards, SHAHAJI. http://phpinterviewanswers.blogspot.com/ On Thu, May 15, 2008 at 11:23 AM, Charlie Markwick <[EMAIL PROTECTED]> wrote: > Say I had two tables. > > GLobalLists > > GID ItemName > > 1 Bulldog > 2 Elephant > 3 Crocodile > > CustomLists > > CID ItemName > > 10001 Aardvark > 10002 Cane Toad > 10003 Giraffe > > Is it possible to run a select that combines the two and then sorts on > ItemName to give me a record set:- > > 10001 Aardvark > 1 Bulldog > 10002 Cane Toad > 3 Crocodile > 2 Elephant > 10003 Giraffe > > Charlie > > [Non-text portions of this message have been removed]