Click here to Skip to main content
14,603,442 members

Comments by Wendell D H (Top 5 by date)

Wendell D H 29-Sep-15 15:57pm View
87,045 Aliens after 30 days? :-)
Wendell D H 29-Sep-15 13:52pm View
I kind of like this problem. :-) I am going to do this for the sake of it. I am not going to post code for reasons mentioned by others, but does anyone have the final answer?
Wendell D H 28-Sep-15 13:59pm View
OK. I see the problem... I am not sure why you have to have a like, but anyway. Try... ICITEM like @PRMICITEM + '%'.
This will only work with string types varvhar, char, etc... IDK, but I believe LIKE will only work correctly with string types. It only makes sense with string types anyway. If ICITEM is an integer, the using like makes no sense. But that's the best information I can provide. Good Luck.
Wendell D H 28-Sep-15 13:28pm View
No. See the 'OR'... If @PRMICITEM is null, then it will not put any restrictions on ICITEM. If @PRMICITEM is 3, then it will only get items with ICITEM = 3. Did you try it? Make sure you have the parenthesis correct. (ICITEM = @PRMICITEM OR @PRMICITEM IS NULL)
Wendell D H 28-Sep-15 13:20pm View
Perhaps I still don't under stand...
Assuming @PRMICITEM is the parameter...
If @PRMICITEM is three, then it will return all records with ICITEM equal to three. If @PRMICITEM is null (which I am assuming is what is meant by empty) the it will not put any restrictions on ICITEM.