dbTalk Databases Forums  

Update question

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Update question in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Vardinghus
 
Posts: n/a

Default Update question - 10-02-2004 , 02:33 AM






Hi All

If I need to update sevel fields on all recordes in a table how would go
about doing that with one update
sentence - is that possible ?

Or do I have to make an update statement for each field...?

--Michael V.



Reply With Quote
  #2  
Old   
Law
 
Posts: n/a

Default Re: Update question - 10-02-2004 , 02:35 AM






Update tblX
Set Field1 = val1, Field2 = val2, Field3 = val3....


"Michael Vardinghus" <michaelvardinghus (AT) notexisting (DOT) com> wrote

Quote:
Hi All

If I need to update sevel fields on all recordes in a table how would go
about doing that with one update
sentence - is that possible ?

Or do I have to make an update statement for each field...?

--Michael V.





Reply With Quote
  #3  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Update question - 10-02-2004 , 06:37 AM



Ouch....is that possible....thanks a lot...


"Law" <lawrencedcoder (AT) hotmail (DOT) com> skrev i en meddelelse
news:eOBS1IFqEHA.644 (AT) tk2msftngp13 (DOT) phx.gbl...
Quote:
Update tblX
Set Field1 = val1, Field2 = val2, Field3 = val3....


"Michael Vardinghus" <michaelvardinghus (AT) notexisting (DOT) com> wrote in message
news:%23VfCEFFqEHA.2636 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi All

If I need to update sevel fields on all recordes in a table how would go
about doing that with one update
sentence - is that possible ?

Or do I have to make an update statement for each field...?

--Michael V.







Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Update question - 10-02-2004 , 06:52 AM



Not only is it possible, it is the most efficient and correct way.

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Michael Vardinghus" <michaelvardinghus (AT) notexisting (DOT) com> wrote

Quote:
Ouch....is that possible....thanks a lot...


"Law" <lawrencedcoder (AT) hotmail (DOT) com> skrev i en meddelelse
news:eOBS1IFqEHA.644 (AT) tk2msftngp13 (DOT) phx.gbl...
Update tblX
Set Field1 = val1, Field2 = val2, Field3 = val3....


"Michael Vardinghus" <michaelvardinghus (AT) notexisting (DOT) com> wrote in message
news:%23VfCEFFqEHA.2636 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Hi All

If I need to update sevel fields on all recordes in a table how would
go
about doing that with one update
sentence - is that possible ?

Or do I have to make an update statement for each field...?

--Michael V.









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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.