Hi,
The following code creates a table called New_Table in the database
and loads the result of the UNION into the new table.
SELECT X.* INTO New_Table FROM
((SELECT
Netbios_name as Machine_Name,
Last_Login as User_Name
FROM Table_A)
union
(select
CI_Name,
Used_by
from
Table_2)) as X
I now need to drop this table if it exists ,
my question is what syntax do i need to precede this with in order to drop the table New_Table?
Thanks
hi lsavidge, thanks for your additional comment
Hi togaong,
if object_id('New_Table') is not null
Drop TABLE New_Table
worked fine...thanks... have not used temp table option
hi pratima mcs...those options didn't work for me ,....thanks for the inputs