Advertisement

10.18.2007 at 04:05PM PDT, ID: 22903375
[x]
Attachment Details

SQL Server 2005: SELECT INTO new TABLE two SELECT statements UNION'ed?

Asked by adworldmedia in SQL Server 2005, MS SQL Server, SQL Query Syntax

Tags: , , ,

I'm looking to import two select statements union'ed together that is using a distinct to get unique records:

select * into cpv2649 from
select distinct keyword from
(select keyword from bcastcpv
union
select keyword from lfmain1) as list

But it gives me an error.  Any ideas on what I can do to acomplish this?

Thanks,
JoeStart Free Trial
[+][-]10.18.2007 at 04:16PM PDT, ID: 20105426

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, MS SQL Server, SQL Query Syntax
Tags: select, sql, union, server
Sign Up Now!
Solution Provided By: cmangus
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_1_20070628