Viewing 15 posts - 1 through 15 (of 46 total)
Thanks Chris.
Never thought of using LIKE in the join. I think your method would be a little more efficient too.
--Lenard
December 16, 2007 at 11:01 am
Well, after going for a nice long freezing walk, I figured it out:
WHERE
EXISTS ( SELECT * FROM @nameParts WHERE Person.FirstName LIKE strval )
...
December 14, 2007 at 8:18 pm
Thanks Kathi.
That is actually what I did after posting the message. Also, because that snippet actually lives in a WHERE clause (I do an EXISTS on it), I also process...
March 13, 2005 at 8:32 pm
Grasshopper,
What is wrong with displaying the "TOP 1" in a GROUP BY? In my case, an Event could be linked to multiple "event days". I didn't want to show...
March 28, 2004 at 11:00 am
Got it sorted out with this article:
http://www.sqlservercentral.com/columnists/sjones/findfirst.asp
--Lenard
March 25, 2004 at 2:46 pm
That would get around it for this simple example. But in my "real world" senario, I have columns which return text based info (like location and incident text) and would fall apart there.
March 21, 2004 at 4:00 pm
Hi Antares686:
Actually, the ID will always be unique. So changing your dataset slightly:
1, 001, 3, 20040301, 20040302
2, 002, 7, 20040501, 20040502
3, 002, 6, 20040503, 20040504
4, 002, 7, 20040505, 20040506
5, 001,...
March 21, 2004 at 12:26 pm
Thanks wz700 for your reply.
Your method won't work in my "real world senario" because some of the columns in my SELECT statement may not contain the same value within the group. I can...
March 21, 2004 at 2:03 am
Thanks for the code ALZDBA. I will give it a whirl shortly.
--Lenard
March 18, 2004 at 10:42 am
Jonathan,
I saw your reply to me on the Topic "help with stored procedure".
Thanks again.
--Lenard
Edited by - lenardd on 10/18/2003 5:18:36 PM
October 17, 2003 at 8:25 pm
Ohhhhh, said the blind man and he picked up his hammer and saw.
I get it now.....thanks!
--Lenard
October 17, 2003 at 8:04 pm
Jonathan, regarding your last statement.....
>> This is also incorrect, as it will return rows with NULL values even when the
>> arameter is not null. That's why I was confused on...
October 17, 2003 at 7:18 pm
Hi Jonathon,
Thanks for your post. Regarding your code:
WHERE (AreaDesignatorID = ISNULL(@areaDesignatorID, AreaDesignatorID) OR ISNULL(AreaDesignatorID, @areaDesignatorID) IS NULL)
Why use 2 ISNULLs when
October 17, 2003 at 7:04 pm
BP,
Yes, I've considered using dynamic SQL. I would have gone that route if I had lots of optional filters. In my case, I only have between 2-5 and preferred...
October 17, 2003 at 3:08 pm
Hi Frank,
Yes, if you are selecting from a list.....However, I'm really talking about non-list items.....like postal codes which the user enters and will be saved to a VARCHAR field. ...
October 17, 2003 at 2:45 pm
Viewing 15 posts - 1 through 15 (of 46 total)