|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there a way to get this query to work in SQL
What I want to do is update 1 table based on data in another. This query works great in Access XP, but I cannot make it work in SQL 2000 sp3. Is there a different way to populate table A with direct data from table B in an update?
Any help is appreciated UPDATE [Clients - Complete], AssociateDirectory SET [Clients - Complete].Phone = AssociateDirectory.WorkPhoneNumber WHERE [Clients - Complete].Name=AssociateDirectory.LastName And [Clients - Complete].FNAME=AssociateDirectory.FirstName; |
|
#2
|
||||
|
||||
|
Code:
UPDATE cc SET cc.Phone = ad.WorkPhoneNumber FROM [Clients - Complete] AS cc INNER JOIN AssociateDirectory AS ad ON cc.Name = ad.LastName AND cc.fname = ad.FirstName
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month Looking for a perl job with kick-*** programmers in a well-known NASDAQ listed tech company with branches in the US and Europe? We're hiring. PM me for details. Requirements |
|
#3
|
|||
|
|||
|
Thanks a bunch
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Is there a way to get this query to work in SQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|