10th April 23:37
Why does this not work?
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 ****yser it works ok - what am I doing wrong
I call this using
..activeconnection = cn
..commandtext = strSQL
..commandtype = adCmdText
set rsStock = cmdStock.execute