all groups > sql server mseq > october 2003 >
You're in the

sql server mseq

group:

Why does this not work?


Why does this not work? Newbie
10/17/2003 1:30:32 PM
sql server mseq:
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

Re: Why does this not work? Newbie
10/17/2003 1:55:55 PM
Never mind - I 've spotted my stupid mistake!
[quoted text, click to view]

AddThis Social Bookmark Button