Unix Technical Forum

Updating Field value from Field in another table

This is a discussion on Updating Field value from Field in another table within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Is there a where to Update the Value of a Field in one table to a Field Value from ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 09:46 PM
Greg
 
Posts: n/a
Default Updating Field value from Field in another table


Is there a where to Update the Value of a Field in one table to a Field
Value from another table.

The following works in MS Access but I am unsure on how to do the same in
SQL 2000

UPDATE [ci_CaseData] INNER JOIN [ci_Addresses] ON [ci_CaseData].[CaseGUID] =
[ci_Addresses].[CaseGUID] SET [ci_CaseData].[NameGUID] =
[ci_Addresses].[AddrGUID]



--
Gregory M. La Due
Twin Tiers Technologies, Inc.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 09:46 PM
Jens Süßmeyer
 
Posts: n/a
Default Re: Updating Field value from Field in another table

Its

Update SomeTable
Set Col1 = T2.Col5
FROM SomeTable T1
Inner join SomeOtherTable T2
ON T1.IDCol = T2.IdCol

HTH, Jens SUessmeyer.


"Greg" <gml_nospam_@twintierstech.com> schrieb im Newsbeitrag
news:U4%ue.53242$g5.25596@twister.nyroc.rr.com...
>
> Is there a where to Update the Value of a Field in one table to a Field
> Value from another table.
>
> The following works in MS Access but I am unsure on how to do the same in
> SQL 2000
>
> UPDATE [ci_CaseData] INNER JOIN [ci_Addresses] ON [ci_CaseData].[CaseGUID]
> = [ci_Addresses].[CaseGUID] SET [ci_CaseData].[NameGUID] =
> [ci_Addresses].[AddrGUID]
>
>
>
> --
> Gregory M. La Due
> Twin Tiers Technologies, Inc.
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 09:47 PM
Greg
 
Posts: n/a
Default Re: Updating Field value from Field in another table

Thanks, that did the trick.

--
Gregory M. La Due
Twin Tiers Technologies, Inc.




"Jens Süßmeyer" <Jens@Remove_this_For_Contacting.sqlserver2005.d e> wrote in
message news:ewY79cQeFHA.1136@TK2MSFTNGP12.phx.gbl...
> Its
>
> Update SomeTable
> Set Col1 = T2.Col5
> FROM SomeTable T1
> Inner join SomeOtherTable T2
> ON T1.IDCol = T2.IdCol
>
> HTH, Jens SUessmeyer.
>
>
> "Greg" <gml_nospam_@twintierstech.com> schrieb im Newsbeitrag
> news:U4%ue.53242$g5.25596@twister.nyroc.rr.com...
>>
>> Is there a where to Update the Value of a Field in one table to a Field
>> Value from another table.
>>
>> The following works in MS Access but I am unsure on how to do the same in
>> SQL 2000
>>
>> UPDATE [ci_CaseData] INNER JOIN [ci_Addresses] ON
>> [ci_CaseData].[CaseGUID] = [ci_Addresses].[CaseGUID] SET
>> [ci_CaseData].[NameGUID] = [ci_Addresses].[AddrGUID]
>>
>>
>>
>> --
>> Gregory M. La Due
>> Twin Tiers Technologies, Inc.
>>
>>

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com