Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6150097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:33:57+00:00 2026-05-23T19:33:57+00:00

I found this link How to return all records if parameter is null I

  • 0

I found this link

How to return all records if parameter is null

I need,

Ignore the parameter/condition just as above, when the parameter value is ALL.

How to achieve this.

Info below, TASK : instead of null there should be ignore if parameter = ALL

Declare @psqluid varchar(15) = 'admin'
Declare @psqlstartdate datetime = '06/01/2010'
Declare @psqlenddate datetime = '06/28/2012'
Declare @psqlcompany varchar(45)
Declare @psqlapplication varchar(10) = 'APP2'
Declare @psqlprogram varchar(10)= 'PROG1'
SELECT * FROM [TMSFINAL].[dbo].[TMTMS] 
WHERE (@psqluid IS NULL  OR [TMSFINAL].[dbo].[TMTMS].[tmsUserID]=@psqluid) 
AND [TMSFINAL].[dbo].[TMTMS].[tmsDate] >= @psqlstartdate 
AND [TMSFINAL].[dbo].[TMTMS].[tmsDate] <= @psqlenddate 
AND (@psqlcompany IS NULL OR [TMSFINAL].[dbo].[TMTMS].[tmsCompany] = @psqlcompany) 
AND [TMSFINAL].[dbo].[TMTMS].[tmsApplication] = @psqlapplication 
AND [TMSFINAL].[dbo].[TMTMS].[tmsProgram] = @psqlprogram
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:33:58+00:00Added an answer on May 23, 2026 at 7:33 pm
    IF @param!="ALL"
    BEGIN
      SET @Sql += 'Condition'
    END
    

    Isn’t works?

    added:

    WHERE @psqluid = "ALL" OR [TMSFINAL].[dbo].[TMTMS].[tmsUserID]=@psqluid ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/ , but there isn't a lot of description around
i have a problem using the Catch Clipboard Events code found on this link
I have found some info on the subject ( like this link) , but
Just found this out, so i am answering my own question :) Use a
I am trying to translate the VBA code found in this link into IronPython.
This does not work <h:form style=display: inline;> <h:outputLink value=#{title.link} > #{msg['g.readMore']} <f:ajax event=click immediate=true
Found this: Sub SurroundWithAppendTag() DTE.ActiveDocument.Selection.Text = .Append( + DTE.ActiveDocument.Selection.Text + ) End Sub But
found this regex: insert every 10 characters: $text = preg_replace(|(.{10})|u, \${1}. , $text); can
Found this rather strange bug in IE8; element.style.top is limited to 1342177 pixels. Even
Reading this question I found this as (note the quotation marks) code to solve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.