RoyceyBaby
IS-IT--Management
- Mar 23, 2001
- 22
Hi,
I have an puzzle. I have worked out how I can check what tables I have in my database using the follwing SQL.
SELECT name FROM sysobjects WHERE type='U' AND left(name,3)='xyz'
This gives me the names of all of the tables I wish to union together.
Question is how can I contruct the SQL statement for the union query automatically.
Any help would be greatly appreciated.
Thanks,
Royce
I have an puzzle. I have worked out how I can check what tables I have in my database using the follwing SQL.
SELECT name FROM sysobjects WHERE type='U' AND left(name,3)='xyz'
This gives me the names of all of the tables I wish to union together.
Question is how can I contruct the SQL statement for the union query automatically.
Any help would be greatly appreciated.
Thanks,
Royce