Skip to Content
avatar image
Former Member

must specify table to select from

Hi everybody

i get this message:

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.

When i'm working in SQL Server they run fine, but when i run in SAP, i receive the error before mentioned.

the Query is this:

someone can help me?

SELECT T1.DocNum AS 'REF SAP',
(SELECT T7.AcctName
 FROM ORCT T6
 INNER JOIN OACT T7 ON T6.TrsfrAcct = T7.AcctCode
 WHERE T6.DocNum = T1.DocNum) AS 'BANCO',
 (SELECT 
  CASE 
    WHEN T8.TrsfrAcct = 101600000 THEN 'MXP'
	WHEN T8.TrsfrAcct = 101700000 THEN 'USD' 
	WHEN T8.TrsfrAcct = 101800000 THEN 'MXP' 
	WHEN T8.TrsfrAcct = 101120000 THEN 'MXP' 
  END AS MONEDA
FROM ORCT T8
INNER JOIN OACT T9 ON T8.TrsfrAcct = T9.AcctCode
WHERE T8.DocNum = T1.DocNum) AS 'MONEDA', T3.DocNum AS 'FACTURA', T3.DocRate AS 'TC_FACTURA', T1.DocDate AS 'FECHA_DEPOSITO', 
(SELECT T4.RATE FROM ORTT T4
INNER JOIN ORCT T5 ON T4.RateDate = T5.DocDate
WHERE T5.DocNum = T1.DocNum ) AS 'TC_DEPOSITO', T2.AppliedFC AS 'IMPORTE'
FROM ORCT T1
INNER JOIN RCT2 T2 ON T1.DocEntry = T2.DocNum
INNER JOIN OINV T3 ON T2.DocEntry = T3.DocEntry
WHERE T1.DocDate >= [%0] AND T1.DocDate<=[%1] 

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers