title: if else nesting in stored procedures
body: <p>I have a stored procedure with if-else statements. i have a scenario where i need a need if else statement inside else statement. i have done this in c# but i need it in sql server since i'm pretty much new to stored procedures.
  lemme provide a sample snippet for u ppl.</p>
  
  <pre><code>create procedure [dbo].[usp_getstore_details](@input varchar(100))
  as 
  begin
      declare @out varchar(100)
      declare @result int
  
      if(LEN(@input)=2)
          begin
            --select  statement here.
          end
      else if (@input like '%[0-9]%')
          begin
            --select statement here 
          end
      else 
          begin
              set @result=(len(@input) - len(replace(@input, ',', '') )
              if(@result&gt;1)
                  begin
                    --select statement here 
                  end
              else
                  begin
                    --select statement here
                  end
          end
  end
  </code></pre>
  
  <p>Thanks in advance for ur help</p>