User Profile

Collapse

Profile Sidebar

Collapse
Tapan Shroff
Tapan Shroff
Last Activity: Feb 14 '12, 07:38 PM
Joined: Feb 13 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • It worked like a charm.... Thank You so much..
    See more | Go to post

    Leave a comment:


  • Sorry that was typo, i have added else but the code suggested also did not work for me...

    may be i was not clear in description ... i have changed the query little (below)...

    what i need is if parameter value is 0(ZERO) then all records should display and if the parameter value is passed as (multiple ID's) then it should display only the selected records...

    Please suggest...

    Code:
    DECLARE @STRID
    ...
    See more | Go to post
    Last edited by Rabbit; Feb 14 '12, 04:53 PM. Reason: Please use code tags when posting code.

    Leave a comment:


  • WHERE clause with IN clause with CASE WHEN...

    I am trying to use below code and it does not work... but cant live without below conditions... is there any otherway anyone knows to do the same thing?

    if i pass 0 in STRID then it should show me ALL records but if i pass 1,2,5 then it should show me only records which has 1,2,5 ID's in tble.

    Thanks in Advance..

    DECLARE @STRID AS VARCHAR(MAX)
    --SET @STRID = '1,2,3'
    SET @STRID = NULL
    ...
    See more | Go to post
No activity results to display
Show More
Working...