Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: Only one expression can be specified......

Status
Not open for further replies.
Mar 20, 2009
102
US
I have the below query:

Select x.intid, x.fieldid, x.extid, custid, name
from ss_hcsscsa.dbo.custcustomer mstr
LEFT OUTER JOIN integrateprod.dbo.intxref x on mstr.custid = x.extid and x.subscriberid = 2 and x.fieldid = 95
where name in (select * from ss_hcsscsa.dbo.top50clients)
group by custid, name, x.intid, x.fieldid, x.extid

I added this part: where name in (select * from ss_hcsscsa.dbo.top50clients)
because the same custid may be used in different databases, so what I want to get is only pulled those customers who are in my "top50clients" table.

Adding that line gives this error:
insert into #custtdata (intid, fieldid, extid, custid, name)

Please advise!

Thanks a bunch....
 
Code:
where name in (select * from ss_hcsscsa.dbo.top50clients)

Should be:
Code:
where name in (select [highlight]name[/highlight] from ss_hcsscsa.dbo.top50clients)

I think.

--

"If to err is human, then I must be some kind of human!" -Me
 
Any time.

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top