Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a *

Status
Not open for further replies.

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
 
using convert function convert the numeric column to varchar and then use the *
 
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? ;)
 
you both got the question correct, which one of the 2 responces would be faster?
 
How do i use the convert in my select statement
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top