Link to home
Start Free TrialLog in
Avatar of Charles Baldo
Charles BaldoFlag for United States of America

asked on

Need update statement

Hi I have two tables

Each table has

Lastname,firstname,housenumber

the first table has a column called "Permit" lets call this table A

I need a sql statement that updates updates table A,  and sets the permit column to 'Y' where the first, last and housumber  match in each of table.

Thanks
Chuck
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
update  A, B
set a.Updated_by='Y'
where a.FirstName=B.FirstName and a.LastName=b.LastName and a.HouseNumber=b.HouseNumber
Avatar of Charles Baldo

ASKER

aneeshattingal thanks it worked dqmq, thanks for the advice. Its a one time mailing list that doesnt need to be real accurate. Even if it misses a good percentage its ok because its good advertisement for their services.