rgb192
asked on
add products.internalsku1 to a working query
select * from products where productid IN (
select distinct pi.productid from ebaytitles et
inner join packageitems pi on pi.packageid=et.packageid
union
select distinct et.packageid from ebaytitles et
inner join products p on p.productid=et.packageid
)
order by productid desc
works but when I add products.internalsku1 (varchar) to last line i get error
Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'where'.
select * from products where productid IN (
select distinct pi.productid from ebaytitles et
inner join packageitems pi on pi.packageid=et.packageid
union
select distinct et.packageid from ebaytitles et
inner join products p on p.productid=et.packageid
)
where internalsku1 is not null order by productid desc
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER