John Sidney-Woollett wrote:
I hope I've read your question properly - I seem to be giving answers to un-asked questions lately! ;)

How about...

SELECT file_name from file_info_1 WHERE file_name='/'
union
SELECT file_name from file_info_2 WHERE file_parent_name='/'
union
SELECT file_name from file_info_3 WHERE file_parent_name='/'
order by file_name;

Does that do what you want?

John Sidney-Woollett

That worked perfectly, though now I realize I have another problem that is hopefully easy to get around. Here is my query (with the type fixed):


SELECT file_name FROM file_info_1 WHERE file_parent_dir='/' UNION SELECT file_name FROM file_info_2 WHERE file_parent_dir='/' UNION SELECT file_name FROM file_info_3 WHERE file_parent_dir='/' ORDER BY file_name;

The trick now is I need to know which table each result came from. I can add another column and record the table number and SELECT that at the same time but before I do I was wondering if I can do this more efficiently or elegantly.

Thank you very much!

Madison

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to