Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > Why does this not work?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 10th April 23:37
newbie
External User
 
Posts: 1
Default Why does this not work?



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 ****yser 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
  Reply With Quote


  sponsored links


2 10th April 23:37
newbie
External User
 
Posts: 1
Default Why does this not work?



Never mind - I 've spotted my stupid mistake!
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666