rgb192
asked on
incorrect syntax near the keyword 'as'
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '.'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'as'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'as'.
Incorrect syntax near '.'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'as'.
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'as'.
SELECT p.productid, p.titleinternal,p.ebaytitle, p.model, p.mpn
, p.internalsku1, p.internalsku2,p.internalsku3p.inwarehouse1
,p.auk1,p.ny1,p.ourinwarehouse1,p.sentquantity1,p.cost1,p.skucount1
,p.inwarehouse2,p.auk2,p.ny2,p.ourinwarehouse2,p.sentquantity2,p.cost2,p.skucount2
,p.inwarehouse3,p.auk3,p.ny3,p.ourinwarehouse3,p.sentquantity3,p.cost3,p.skucount3
,p.inwarehouse4,p.auk4,p.ny4,p.ourinwarehouse4,p.sentquantity4,p.cost4,p.skucount4
,p.asin,sd.accessories as accessories,sd.pyxisprice as price, sd.pathid as pathid
, datalength(sd.features) as fl, datalength(sd.specifications) as sl
, datalength(sd.itemincludes) as il, datalength(sd.ebaydescription) as ed
, (SELECT COUNT(*) FROM productspecifics WHERE productid = p.productid) as specs
, (SELECT COUNT(*) FROM productimages WHERE productid = p.productid) as imgs
FROM products p
left join sitedata sd
on p.productid = sd.productid
WHERE p.folderid = ''
AND p.active = '1'
ORDER BY titleinternal
SELECT p.productid, p.titleinternal,p.ebaytitl e,p.model, p.mpn,p.in ternalsku1 ,p.interna lsku2,
p.internalsku3,p.inwarehou se1,p.auk1 ,p.ny1,p.o urinwareho use1,p.sen tquantity1 ,p.cost1,p .skucount1 ,
p.inwarehouse2,p.auk2,p.ny 2,p.ourinw arehouse2, p.sentquan tity2,p.co st2,p.skuc ount2,
p.inwarehouse3,p.auk3,p.ny 3,p.ourinw arehouse3, p.sentquan tity3,p.co st3,p.skuc ount3,
p.inwarehouse4,p.auk4,p.ny 4,p.ourinw arehouse4, p.sentquan tity4,p.co st4,
p.skucount4,p.asin,sd.acce ssories as accessories,sd.pyxisprice as price,sd.pathid as pathid, datalength(sd.features) as fl,
datalength(sd.specificatio ns) as sl, datalength(sd.itemincludes ) as il,datalength(sd.ebaydescr iption) as ed,
(SELECT COUNT(*) FROM productspecifics WHERE productid = p.productid) as specs,
(SELECT COUNT(*) FROM productimages WHERE productid = p.productid) as imgs
FROM products p left join sitedata sd on p.productid = sd.productid
WHERE p.folderid = '' AND p.active = '1' ORDER BY titleinternal
Try that? Looks like you missed a couple commas.
p.internalsku3,p.inwarehou
p.inwarehouse2,p.auk2,p.ny
p.inwarehouse3,p.auk3,p.ny
p.inwarehouse4,p.auk4,p.ny
p.skucount4,p.asin,sd.acce
datalength(sd.specificatio
(SELECT COUNT(*) FROM productspecifics WHERE productid = p.productid) as specs,
(SELECT COUNT(*) FROM productimages WHERE productid = p.productid) as imgs
FROM products p left join sitedata sd on p.productid = sd.productid
WHERE p.folderid = '' AND p.active = '1' ORDER BY titleinternal
Try that? Looks like you missed a couple commas.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
You have:
p.skucount4 p.asin,sd.accessories as accessories,
and it should be
p.skucount4 as in,sd.accessories as accessories,