sql query
From: evagelos (evagelos_21_at_hotmail.com)
Date: 10/04/04
- Next message: Fran: "Problem with DAO360.dll"
- Previous message: David: "Password problem"
- Next in thread: Tim Baur: "Re: sql query"
- Reply: Tim Baur: "Re: sql query"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 4 Oct 2004 20:05:01 +0300
Hi To All
I am trying to make a sql(access) query through my vb6 small app but with
out any result.
Here is my DB.
PARASTA(table) STOCKMOV(table) STOCK(table)
#CODE_PARAS ====> CODE_PARASTA value
VALUE value DESCRIBE
CODE_STOCK <===== #CODE_STOCK
each PARASTA has many STOCKMOV(moves)
At the end of the year the user from table STOCKMOV must summarize the
"values" and add them into STOCK table to the apropriate CODE_STOCK.
My query:
Data1.Database.Execute " UPDATE STOCK " _
& " SET STOCK.value = (SELECT
Sum(STOCKMOV.value)
& "From STOCKMOV " _
& "GROUP BY STOCKMOV.CODE_STOCK"
Data1.Refresh
gives my an error '3073' :
Operatiuon must use an updatetable query
What am i doing wrong?
thank you in advance
- Next message: Fran: "Problem with DAO360.dll"
- Previous message: David: "Password problem"
- Next in thread: Tim Baur: "Re: sql query"
- Reply: Tim Baur: "Re: sql query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|