If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > What is wrong with this command?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-17-03, 15:52
bwood415 bwood415 is offline
Registered User
 
Join Date: Oct 2003
Posts: 42
What is wrong with this command?

Having trouble with this Update table. I have two tables one is the final table for this information the other is information pulled from a file. Now what is suppose to happen is the new information is suppose to be put into the final table where that information goes to that persons name. But the UPDATE script keeps saying their is an error. Now I have tried this in many differnt ways any help is appreciated.


DoCmd****nSQL "UPDATE Test SET(October_Minutes),(October)=SELECT [Minutes],[Charges]FROM Qry WHERE (User_Name FROM Test) = (User_Name FROM Qry)"

Thanks,
Bill
Reply With Quote
  #2 (permalink)  
Old 10-17-03, 16:17
bwood415 bwood415 is offline
Registered User
 
Join Date: Oct 2003
Posts: 42
Forgot to metion

This is in Access 2000.
Reply With Quote
  #3 (permalink)  
Old 10-17-03, 20:50
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
that's the weirdest sql i've seen in a while -- where'd it come from?

here, try this:
Code:
UPDATE Test 
INNER JOIN Qry
 ON Test.User_Name       = Qry.User_Name
SET Test.October_Minutes = Qry.[Minutes]
  , Test.October         = Qry.[Charges]
rudy
http://r937.com/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On