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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple query problem

Status
Not open for further replies.

zumie

Technical User
Mar 13, 2002
73
US
I'm an IT guy that needs to construct a query that places a 0 in an email field when I get bounceback email and changes the DateModified. What I have gives me a syntax error:

UPDATE [NAMES]
SET EMAIL = 0
WHERE EMAIL
IN(SELECT [Found Address] FROM [MBounce2006-01-24])
and SET DateModified = 01/20/20060
WHERE EMAIL
IN(SELECT [Found Address] FROM [MBounce2006-01-24]);

A little help from the pros?

Zumie [peace]



Visualize whorld peas.
 
zumie,

UPDATE [NAMES]
SET email = 0,
datemodified = #01/20/2006#
WHERE email IN (SELECT [Found Address]
FROM [MBounce2006-01-24]
WHERE = value_here)

value_here = value to filter the record in your subquery.

I'm assuming you are updating 2 columns from NAMES table and you are limiting your update base on the return values from you subquery.

Please let me know if this wont solve your problem.

Ogie
 
Ogie,

Thanks for the help. This worked:

UPDATE [NAMES]
SET email = 0,
datemodified = #1/20/2006#
WHERE email IN (SELECT [Found Address] FROM [MBounce2006-01-24]);

Thanks again.

Zumie [peace]



Visualize whorld peas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top