SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 update query issue.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

subhaoviya
Posting Yak Master

India
135 Posts

Posted - 08/24/2012 :  09:40:30  Show Profile  Reply with Quote
Hi,

I tried to update some columns in a destination table from source table. actually the update needs to happen for more than 3 lakhs records. the query has executing for long time, so i cancelled the query manually.

my dought is, is come of the column gets updated into destination table or non of the column gets updated?

thanks
subetha.

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 Posts

Posted - 08/24/2012 :  09:45:17  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
A single statement is atomic. Either it will complete or fail.
That is unless you have something odd implemented.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

subhaoviya
Posting Yak Master

India
135 Posts

Posted - 08/24/2012 :  09:53:17  Show Profile  Reply with Quote
thanks nigel
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52317 Posts

Posted - 08/24/2012 :  11:01:39  Show Profile  Reply with Quote
quote:
Originally posted by subhaoviya

Hi,

I tried to update some columns in a destination table from source table. actually the update needs to happen for more than 3 lakhs records. the query has executing for long time, so i cancelled the query manually.

my dought is, is come of the column gets updated into destination table or non of the column gets updated?

thanks
subetha.



if performance is a concern consider adding an index to speed up update

also do it in batches if log is getting filled up

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000