Feb 19, 2001 #1 EscapeUK Programmer Jul 7, 2000 438 GB Is there a * facility for numbers. I have a search that looks at a table of numbers. Sometimes they can enter a value sometimes but sometimes if they want they don't have to. Any ideas
Is there a * facility for numbers. I have a search that looks at a table of numbers. Sometimes they can enter a value sometimes but sometimes if they want they don't have to. Any ideas
Feb 19, 2001 #2 alpine IS-IT--Management Dec 29, 2000 3 IN using convert function convert the numeric column to varchar and then use the * Upvote 0 Downvote
Feb 19, 2001 #3 mfairchild Programmer Feb 19, 2001 27 US I'm not sure exactly what you are trying to do but, if your search is using a parameter to a stored procedure, use "or". Example: Create MySearchProcedure @Integer_Parameter integer = Null AS SELECT Integer_Column FROM TableSearchingIn WHERE (Integer_Column = @Integer_Parameter or @Integer_Parameter is Null) Or did I miss the point of the question? Upvote 0 Downvote
I'm not sure exactly what you are trying to do but, if your search is using a parameter to a stored procedure, use "or". Example: Create MySearchProcedure @Integer_Parameter integer = Null AS SELECT Integer_Column FROM TableSearchingIn WHERE (Integer_Column = @Integer_Parameter or @Integer_Parameter is Null) Or did I miss the point of the question?
Feb 19, 2001 Thread starter #4 EscapeUK Programmer Jul 7, 2000 438 GB you both got the question correct, which one of the 2 responces would be faster? Upvote 0 Downvote
Feb 19, 2001 Thread starter #5 EscapeUK Programmer Jul 7, 2000 438 GB How do i use the convert in my select statement Upvote 0 Downvote
Feb 20, 2001 Thread starter #6 EscapeUK Programmer Jul 7, 2000 438 GB Sorry just been looking at my app and I would rather not use the 'or' option as there are 5 parameters being used that might have null Upvote 0 Downvote
Sorry just been looking at my app and I would rather not use the 'or' option as there are 5 parameters being used that might have null