Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 4,080 total)

  • RE: Handle NULLs

    How should I format my case solution to get in on the testing?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Handle NULLs

    Fun problem. 😀

    This solution might be a little less CPU intensive because the only string manipulation is done with ISNULL or CASE tests.

    The trick is to squeeze out the...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Filter challenge

    The code below will return only rows 5,6,7,8 from the sample table.

    ; with SampleTable AS

    (

    SELECT *

    ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Filter challenge

    So this original requirement is off the table now?

    where count of Code >=2 group by GroupID

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Filter challenge

    Okay... so we want to see any group with two or more types that have two or more rows per type.

    Now tell us again how codes fit into that. ...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Filter challenge

    We're getting there. You only want to see groupIDs that have at least 2 members of each type. But what about this case?

    Group 99...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: CTE race condition?

    It may help to think of CTEs as views, since that's how they behave. Query plans generated from a CTEs may sometimes make use of a...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: CTE race condition?

    What does your execution plan for the query show? Could you post it here please?

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: How to concatenate a New line???

    Tommy is right. Adding CHAR(13) or even CHAR(13) + CHAR(10) to your output string does NOT create a new row. It just creates a...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Filter challenge

    JohnDBA (7/8/2011)


    --I made a mistake...Sorry

    I only want to see the records where count of Code >=2 group by GroupID

    however, if and only if count of same type >= 2 group...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Filter challenge

    I don't think so, Jason. Your query returns all rows. You may be misreading his requirements.

    John, can you please explain to us why number 7 in...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Indexes:Few querries

    koustav_1982 (7/4/2011)


    The Dixie Flatline (7/1/2011)


    # 1. In your example, the optimizer uses the nonclustered index because it is a "covering" index containing all the columns needed to satisfy...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Trigger to Insert data into a table and execute Stored procedure based on if condition

    WC is right. I'm sorry for using the term 'inline' in such a misleading way.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: Trigger to Insert data into a table and execute Stored procedure based on if condition

    Take a look at the OUTPUT clause used in conjunction with an UPDATE to create your temporary table. Why create a trigger? Just put the additional...

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

  • RE: binary tree transversal

    without using cursor and recursive function

    Why is this a requirement?

    I suggest that you read up on the new hierarchyID datatype in 2008. You can start here.

    __________________________________________________

    Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
    Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills

Viewing 15 posts - 1,036 through 1,050 (of 4,080 total)