-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: Nitin Mekhiya
Message 1 in Discussion

friends  I am writing one stored procedure (SQL SERVER) I am facing following two 
problems. Can some one please help me.
-------------------------------------------------------------------------
1)In If then Else condition ,how do i check for sub string Presence. eg: -   If EmpID 
in @sArray 
             Begin
              ..........
             End   (@sarray is string with comma separated IDs.      eg:-  sArray = 
(2,5,2,5)  )    IN or NOT  IN doesnt work unless it is an SQL query. (is it so ?)  
--------------------------------------------------------------------------
 2) I am starting one Transaction inside stored Procedure. Now inside If then Else 
condition..Can i Rollback the transaction. -------------------------See the Stored 
Proc structure below 
Begin Transaction saveEmpData 
    If Flag
        Begin
         .....
        End
    Else
       Begin
          Commit Rollback   (or) (Rollback Transaction saveEmpData)
       End 
Commit Transaction saveEmpData
----------------------------------------end of stored proc What is the right way of 
doing rollback depending on some internal flag/situation  and what is the SYNTAX for 
doingso.   Perhaps the question might be really silly but it has taken my last 2 days. 
  Please help.
Nitin Mekhiya 
 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to