New to the CF scene
Join Date: Jul 2012
Thanked 0 Times in 0 Posts
Originally Posted by alykins
ok- so are you using Microsoft SQL Server Management Studio? Copy the query you posted to a new query and try it- does it work? Why does it fail (if it does)?
It produced the following error when I ran the query in Microsoft SQL Server Management Studio:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'voltage'.
I also cleaned up the query a bit to make it a bit more readable:
select P2.voltage,V.voltage voltage2,count(*) as KOL
from Lights_America..temp_products P2
left join voltage V on (P2.voltage=V.id)
left join excludedproducts E on (E.storeid=9 and E.id=P2.id)
and voltage in (1)
and manufacturer_name in (143,135,153,171,151,217,184,185,181,179,183,175,150,123,130,129,121,128,18,14,66,37,77,65,11,68,46,60,43,41,45,108,38,98,40,26,48,25,28,42,62,13,9,30,39,70,47,64,74,116,33,97,12,107,101,16,29,57,59,7,15,71,1,72,54,10,19,51,53,35,69,114,118,17,67,52,63,34,102,76,31,191,188,190,133,134,194,196,160,159,163,209,216,213,214,211,139,58,208,204,168,166,142,165,164,138,140)
group by P2.voltage,V.voltage
order by voltage2
Does that help?
Last edited by dla314; 07-12-2012 at 09:53 PM..