sql query

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: evagelos (evagelos_21_at_hotmail.com)
Date: 10/04/04


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



Relevant Pages

  • Re: How much time does a query take?
    ... not only the MSDE running, but also a visualisation for a part of a ... tell our app when a fault occured und when it went away. ... the app would execute a query against the database to retrieve the ... Like I wrote in my first question, in that way there can be a query every ...
    (microsoft.public.sqlserver.msde)
  • Re: SQl Data Provider Performance Issues
    ... Can you provide a complete sample app ... selects with a single inner join perforn OK. ... When I run the query from SQL ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem with an ADO query against SQL Server
    ... Debugging a hung app on the client side is another story... ... >>Use SQL server profiler to find out what "actually" is going on with SQL ... >>Server times out the query. ... >>> Or, was my program waiting somehow, for a response to the first query ...
    (microsoft.public.vb.database.ado)
  • Re: Convert Columns to Rows and insert into another table based on val
    ... The UNION query worked. ... FROM [ApplicationsServersGrid] ... I still get the 1s in the second column, not the app names and app ... ran in the Query Window for testing puroses, Also the Server may ...
    (microsoft.public.access.formscoding)
  • Re: Convert Columns to Rows and insert into another table based on val
    ... When I tried using the Union Query the last time using just 2 columns ... I still get the 1s in the second column, not the app names and app ... ran in the Query Window for testing puroses, Also the Server may ...  And each record would contain the servers LogicalName, ...
    (microsoft.public.access.formscoding)