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

Need help on query syntax 1

Status
Not open for further replies.

Cenedra

Programmer
Jan 2, 2003
114
US
I'm updating a field across two databases. I know I"m close, but can you please tell me where my syntax is wrong here?


update Q_UCDavis_1009.dbo.Clients
set Q_UCDavis_1009.dbo.Clients.Race = Q_UCDavis_RACES.dbo.Clients.Race
where Q_UCDavis_1009.dbo.Clients.SSN = Q_UCDavis_RACES.dbo.Clients.SSN

Thanks for your help
Cen
 
Code:
UPDATE Q1
   Set Race = Q2.Race 
   From Q_UCDavis_1009.dbo.Clients Q1 inner join 
        Q_UCDavis_RACES.dbo.Clients Q2
   On (Q1.SSN=Q2.SSN)
-Karl



[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top