Forum Replies Created

Viewing 15 posts - 1 through 15 (of 46 total)

  • RE: Partial String Search from Subquery

    Thanks Chris.

    Never thought of using LIKE in the join. I think your method would be a little more efficient too.

    --Lenard

  • RE: Partial String Search from Subquery

    Well, after going for a nice long freezing walk, I figured it out:

    WHERE

    EXISTS ( SELECT * FROM @nameParts WHERE Person.FirstName LIKE strval )

    ...

  • RE: Function in WHERE clause

    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...

  • RE: Using "Top 1" and "Group By" Together

    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...

  • RE: Using "Top 1" and "Group By" Together

    Got it sorted out with this article:

    http://www.sqlservercentral.com/columnists/sjones/findfirst.asp

    --Lenard

     

  • RE: A better way to summarize Date results?

    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. 

  • RE: A better way to summarize Date results?

    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,...

  • RE: A better way to summarize Date results?

    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...

  • RE: "With Encryption"

    Thanks for the code ALZDBA.  I will give it a whirl shortly. 

    --Lenard

  • RE: OR Evaluations

    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

  • RE: help with stored procedure

    Ohhhhh, said the blind man and he picked up his hammer and saw.

    I get it now.....thanks!

    --Lenard

  • RE: help with stored procedure

    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...

  • RE: OR Evaluations

    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

     
  • RE: help with stored procedure

    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...

  • RE: OR Evaluations

    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. ...

Viewing 15 posts - 1 through 15 (of 46 total)