Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 13th, 2006, 08:33 AM
Friend of Wrox
 
Join Date: Feb 2006
Location: noida, UP, India.
Posts: 133
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav_jain2403
Default Sub Transaction Problem

Hello Friends,
Can anyone of you tell me the output of following query using Transactions:

BEGIN TRANSACTION
      INSERT TABLE1(COL_1,COL_2)
      VALUES('ONE','TWO')
      BEGIN TRANSACTION
      INSERT TABLE1(COL_1,COL_2)
      VALUE('THREE','FOUR')
      ROLLBACK
COMMIT

How many rows will be inserted,if any? What is the logic?
Thank you.

Gaurav Jain
__________________
Gaurav
 
Old May 13th, 2006, 08:46 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

When's this due in by :)?

--

Joe (Microsoft MVP - XML)
 
Old May 13th, 2006, 08:57 AM
Friend of Wrox
 
Join Date: Feb 2006
Location: noida, UP, India.
Posts: 133
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav_jain2403
Default

I didn't expect such a reply. Cannot anyone tell me the output of running the above query.
 
Old May 13th, 2006, 10:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by gaurav_jain2403
 I didn't expect such a reply.

It's just that your question, and the other one you posted in another topic, look suspiciously like homework problems. Joe, and I as well, are just curious when the assignment is due...

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com




Similar Threads
Thread Thread Starter Forum Replies Last Post
Any help problem when trying to make a transaction koco .NET Framework 3.5 0 June 20th, 2008 03:51 AM
Problem with nested transaction balesh ASP.NET 1.0 and 1.1 Professional 1 November 25th, 2006 01:38 PM
Transaction problem (pg298) abc_abc BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 0 June 29th, 2006 02:57 AM
Problem Regarding DB2 transaction log amitbattu J2EE 0 July 21st, 2004 03:43 AM
Problem in biztalk transaction block Avi Biztalk 0 July 2nd, 2004 02:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.