Stored Proc Conditions

Results 1 to 2 of 2

Thread: Stored Proc Conditions

  1. #1
    Join Date
    Dec 1969

    Default Stored Proc Conditions

    How can I accomplish the following<BR><BR>have a sproc where I want to do this...<BR><BR>find the count of a sql statement<BR>if the count = 0 run some sql<BR>if the coune &#062; 0 run some other sql

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Stored Proc Conditions

    Declare @CountOfSomething int<BR><BR>select @CountOfSomething = count(*) from TableName<BR><BR>if @CountOfSomething = 0 <BR>begin<BR>.....<BR>end<BR>else<BR>begin<BR>.... ..<BR>end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts