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!

Being Dense - Trying to update field using joined tables

Status
Not open for further replies.

PreacherUK

Technical User
Sep 26, 2002
156
NL
Hi All,

Heres my query (excuse the formatting as it gets squashed inot the form window):

SELECT dbo.[tblLending Accounts].[ACCT-NUM], dbo.[tblLending Accounts].[SHORT-DESC], dbo.[tblLending Accounts].[CLIENT-NAME],
dbo.[tblLending Accounts].[Lending Account Name], dbo.[tblLending Accounts].[Investment Type], dbo.[tblLending Accounts].TimeStamp,
dbo.[tblLending Accounts].ClientDomocile, dbo.[tblLending Accounts].TaxGroup, dbo.[tblLending Accounts].LastActiveDate,
dbo.[tblLending Accounts].NAVCreation, dbo.[tblLending Accounts].AvailabilityBroadcast, dbo.[tblLending Accounts].[STOCK-LOAN-PART],
dbo.[tblGSP56S22 - Account Data].[STOCK-LOAN-PART] AS CurrentGSPSLP
FROM dbo.[tblLending Accounts] LEFT OUTER JOIN
dbo.[tblGSP56S22 - Account Data] ON dbo.[tblLending Accounts].[ACCT-NUM] = dbo.[tblGSP56S22 - Account Data].[ACCT-NUM]
WHERE (dbo.[tblGSP56S22 - Account Data].[STOCK-LOAN-PART] IS NOT NULL)

And heres the update:

UPDATE dbo.[tblLending Accounts]
SET dbo.[tblLending Accounts].[STOCK-LOAN-PART]= dbo.[tblGSP56S22 - Account Data].[STOCK-LOAN-PART]

Can someone show me how to update the field I want from the above query/view?

Many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top