Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query Headache 1

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi,

I know this has been asked before, but I cant get my head around it.
I have a table called tblauxdaily it has multiple fields, but i only want ot concentrate on Agentname and Lucent.

I have another table called tblagentlist this also has AgentName and LucentLogin,

tblauxdaily has all lucentlogins in, I need a query to find all blanks LucentLogin in tblagentlist and check the name in tblauxdaily and copy the lucent data into lucentlogins in tblagentlist. this will then give me a tbl with all the lucent logins for all agents.

can anyone help as I am getting very frustrated with it, I am sure it is an update query but cannot get anything to work.



Hope this is of use, Rob.[yoda]
 
Something like this ?
UPDATE tblagentlist A INNER JOIN tblauxdaily B ON A.AgentName = B.AgentName
SET A.LucentLogin = B.Lucent
WHERE Trim(A.LucentLogin & "") = "";

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
worked a treat, just copied and pasted into SQL view and ran and worked first time.

cheers PHV

Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top