Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-28-2012
Registered User
 
Join Date: Jan 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rolling back SQL transaction

Can some one help me related to .sql file issue.

I have a .sqlfile and tried to read the file thru unix. In the .sqlfile I have error rows as well and when error comes I dont want to proceed further and need to roll back all the transactions.

sample .sql file below



Code:
insert into
test values (9);
update test set id=9 where id=10;
updte test set id=3;
insert into
test values (1);
insert into test values (1);

I tried with "WHENEVER SQLERROR EXIT SQL.SQLCODE ROLLBACK" option also. Can some one help

Last edited by radoulov; 06-28-2012 at 05:37 PM..
Sponsored Links
    #2  
Old 06-28-2012
alister alister is offline Forum Advisor  
Registered User
 
Join Date: Dec 2009
Posts: 2,601
Thanks: 123
Thanked 717 Times in 600 Posts
Quote:
Originally Posted by sri_aue View Post
Can some one help me related to .sql file issue.
Perhaps, if you start your own thread instead of hijacking another's. It's basic netiquette not to do that.

Regards,
Alister
Sponsored Links
    #3  
Old 06-28-2012
radoulov's Avatar
--
 
Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 5,468
Thanks: 139
Thanked 538 Times in 506 Posts
Quote:
Originally Posted by alister View Post
Perhaps, if you start your own thread instead of hijacking another's. It's basic netiquette not to do that.
New thread opened.
Thanks!
The Following User Says Thank You to radoulov For This Useful Post:
alister (06-28-2012)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rolling Back an Update Brandon9000 Linux 27 05-10-2012 08:11 PM
rolling back Technology Level manoj.solaris AIX 2 01-24-2011 07:06 PM
Append transaction header lines to same transaction's detail lines rookie12 Shell Programming and Scripting 3 06-18-2010 02:01 AM
Log Rolling waaraa1331 UNIX for Dummies Questions & Answers 8 08-18-2008 06:37 PM
Rolling back time Cameron UNIX for Dummies Questions & Answers 5 03-26-2002 08:31 AM



All times are GMT -4. The time now is 12:18 AM.