N
Newbie
Hi
I have the following SQL string that I pass to SQL 2000 using a command but
I get the error -2147217900 - The column prefix 'A' does not match with a
table name or alias name used in the query.
Here is the string
Select StockCode From InvMaster A Where WarehouseToUse = 'P' AND StockCode =
'016430004' and not exists (Select Distinct M.StockCode from InvMovements M
inner join InvMaster I On M.StockCode = I.StockCode And I.StockCode =
A.StockCode Where EntryDate >= '30/09/2002') Order By A.StockCode
If I put this is SQL Query Analyser it works ok - what am I doing wrong
I call this using
with cmdStock
..activeconnection = cn
..commandtext = strSQL
..commandtype = adCmdText
end with
set rsStock = cmdStock.execute
I have the following SQL string that I pass to SQL 2000 using a command but
I get the error -2147217900 - The column prefix 'A' does not match with a
table name or alias name used in the query.
Here is the string
Select StockCode From InvMaster A Where WarehouseToUse = 'P' AND StockCode =
'016430004' and not exists (Select Distinct M.StockCode from InvMovements M
inner join InvMaster I On M.StockCode = I.StockCode And I.StockCode =
A.StockCode Where EntryDate >= '30/09/2002') Order By A.StockCode
If I put this is SQL Query Analyser it works ok - what am I doing wrong
I call this using
with cmdStock
..activeconnection = cn
..commandtext = strSQL
..commandtype = adCmdText
end with
set rsStock = cmdStock.execute