stored procedure question

Results 1 to 2 of 2

Thread: stored procedure question

  1. #1
    Join Date
    Dec 1969

    Default stored procedure question

    I am passing parameters from my vbscript to a stored procedure which does the check below and constantly returns a recordcount value of minus 1. In query analyser when I run my query (which I have retirieved from profiler) I get an empty recordset returned. However, when I put null in the place of the empty params my information is returned. My question is this, how do I pass the value null if the user leaves an input field blank, or how do I create the value null in the stored procedure b4 the query is run if it recieves &#039; &#039; as a value? Thanks for your help.<BR><BR>if ((@FirstName is null or @FirstName=&#039;&#039;) and (@Surname is null or @Surname =&#039;&#039;) and (@DOB is not null or @DOB &#060;&#062;&#039;&#039;))

  2. #2
    Join Date
    Dec 1969

    Default Trim()

    use Trim() to get rid of the excess spaces

Posting Permissions

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