Forum Replies Created

Viewing 15 posts - 961 through 975 (of 4,081 total)

  • RE: need help with the code

    I STRONGLY agree with Lowell. You are shooting yourself in the foot by storing the datetime information as varchar. You are losing the entire...

  • RE: Selecting Max(ID)

    It depends. The Row_Number() technique wins at low volumes and the MAX() function performs better as you start moving up to to tens of thousands of rows....

  • RE: How to use temporary table in function

    This post intentionally left blank.

  • RE: Selecting Max(ID)

    bubs,

    This may be an irrelevant question, but how many rows are you planning on running against? If this is a one time shot it's...

  • RE: A search with a Rank

    I am about to go out of town for several days, so this will be my last post, but you seem to be on the right track. ...

  • RE: A search with a Rank

    I don't really know of anything more "comprehensive". Ranking is based on a criteria of some sort which must be defined. In your example for...

  • RE: Select phone numbers depending on priority

    Chrissy,

    Please note that the query using the revised design provides output in this format

    Staff_ID Phone_nbr

    1 ...

  • RE: A search with a Rank

    Sounds like an interesting problem, but we need a little more help before we can offer a solution.

    Could you give us a little more information?

    What would...

  • RE: Help with two SQL issues

    You're welcome.

    CTEs are just like views, except you define them for the duration of a single query.

    Alternatively, think of them as subqueries that you read from top to bottom,...

  • RE: Pivot Problem

    Try this instead of the PIVOT. See if it helps.

    select site

    , sum(case when [status] = 'Available' then 1 else 0 end) as Available

    , sum(case when [status]...

  • RE: Help with two SQL issues

    Here's a shot at your first requirement. For a high-volume table I'd probably use a cursor, or even let the calling application highlight the consecutive rows....

  • RE: Select phone numbers depending on priority

    You get an A+ for setting up the problem so perfectly. Thank you so much!! 😀

    Here's a solution for you

    select StaffID

    ,COALESCE(case...

  • RE: Are the posted questions getting worse?

    GilaMonster (7/20/2011)


    Ninja's_RGR'us (7/20/2011)


    GilaMonster (7/20/2011)


    Jeff Moden (7/20/2011)


    I understand that Gail Shaw will be co-presenting with you...

    Yup, Grant and I are doing comed^H^H^H^H^H execution plans as a precon on the Monday.

    What...

  • RE: Are the posted questions getting worse?

    ... and he feeds pork chops to the hungry multitudes.

  • RE: Checking for patterns in a int

    Call the people at SETI[/url]. 😀

    Seriously, I think T-SQL may be the wrong tool for the job of discovering undefined patterns. This sounds like it's more in...

Viewing 15 posts - 961 through 975 (of 4,081 total)