Buen día Expertos
Tengo un problema me marca los siguientes error en query manager:
1). [Microsoft][SQL Server Native Client 11.0][SQL Server]Must specify table to select from.
2). [Microsoft][SQL Server Native Client 11.0][SQL Server]Statement ‘’ (SWEI) (s) could not be prepared.
Esto sucede cuando pongo los parámetros en la sentencia aquí esta el query.
SELECT distinct T1.WhsCode as 'Alm', T0.CardCode as 'Prov Pref', T0.ItemCode as 'Art.', T0.ItemName as 'Descripción', T0.SuppCatNum as 'Catálogo',
T0.InvntryUom as 'Ud.', T1.OnHand as 'Stock Actual', (Select top 1 A.CalcPrice From OINM A Where A.TransType = 20 and A.Warehouse= t1.WhsCode and A.ItemCode = t0.ItemCode order by A.itemcode, A.docdate desc ) as 'Costo', T2.Price as 'LP'
FROM OITM T0
INNER JOIN OITW T1 ON T0.ItemCode = T1.ItemCode
INNER JOIN ITM1 T2 ON T1.ItemCode = T2.ItemCode
Inner Join OINM t3 On t2.ItemCode = t3.ItemCode And t1.WhsCode = t3.Warehouse And t3.TransType = 20
WHERE T2.Pricelist = [%0] AND T1.WhsCode = [%1]
GROUP BY T1.WhsCode, T0.CardCode, T0.ItemCode, T0.ItemName, T0.SuppCatNum, T0.InvntryUom, T1.OnHand, T3.CalcPrice, T2.Price,t1.AvgPrice,t0.LastPurPrc
Order by t0.ItemCode