Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 18,926 total)

  • RE: Clever concatination

    You might as well insert the 10 parameters in the tvp (without bothering with ifs) and then use where value is not null in the concat function.

  • RE: Clever concatination

    Cadavre (10/26/2011)


    Ninja's_RGR'us (10/26/2011)


    Cadavre (10/26/2011)


    Ninja's_RGR'us (10/26/2011)


    You can try with

    FOR XML PATH.

    I've seen that suggested in the past. I don't have a full understanding of what it does so I...

  • RE: Violating Foreign Keys

    dick.baker (10/26/2011)


    @cfradenburg

    thanks for your reply, and I apologise for my last line which was out of order

    - perhaps Q just hit my funny-bone badly !

    Hence my punching bag idea :-D....

  • RE: Clever concatination

    Cadavre (10/26/2011)


    Ninja's_RGR'us (10/26/2011)


    You can try with

    FOR XML PATH.

    I've seen that suggested in the past. I don't have a full understanding of what it does so I recommend you...

  • RE: The Good Job

    Tony++ (10/26/2011)


    I did make my move 3 months ago. The funny part was that the company I was leaving had a hard time believing that I wasn't leaving for...

  • RE: Database Free Space Sp_spaceused

    Cadavre (10/26/2011)


    Ninja's_RGR'us (10/26/2011)


    NP.

    Was what so important in that meeting that could make this unbeknownst guy wait for his answer! 😀

    You should talk to the authorities about that!

    heh. I'll attend...

  • RE: Clever concatination

    You can try with

    FOR XML PATH.

    FOR XML PATH TYPE

    I've seen that suggested in the past. I don't have a full understanding of what it does so I recommend...

  • RE: Database Free Space Sp_spaceused

    NP.

    Was what so important in that meeting that could make this unbeknownst guy wait for his answer! 😀

    You should talk to the authorities about that!

  • RE: DBCC checkdb fials on several databases, but not all

    I hit google in case I could find something useful (Paul Randal's posts... as he's the ms guy who wrote the code!).

    That thread might help out even if you seem...

  • RE: Summation of amount in T-Sql

    SaintGr8 (10/26/2011)


    Ninja's_RGR'us (10/26/2011)


    The way I do this without preaggregating everything is with an outer apply.

    Works reasonably fast here so I didn't bother trying to find faster way to access the...

  • RE: Summation of amount in T-Sql

    The way I do this without preaggregating everything is with an outer apply.

    Works reasonably fast here so I didn't bother trying to find faster way to access the data, so...

  • RE: Summation of amount in T-Sql

    ChrisM@Work (10/26/2011)


    SaintGr8 (10/26/2011)


    Hello!

    Please run the queries below to get along....

    Your script has numerous faults - I'm sure if you fix them and repost, it won't take long to solve this.

    I...

  • RE: Clever concatination

    Why SPACE(0) instead of ''?

    P.S. Nice solution ;-).

  • RE: Are the posted questions getting worse?

    ChrisM@Work (10/26/2011)


    L' Eomot Inversé (10/26/2011)


    Do we have a would-be Celko here? A somewhat style-less and inept one, perhaps, but...

    Celko's less personally offensive. This guy would benefit from a warning...

  • RE: Database Free Space Sp_spaceused

    derekr 43208 (10/26/2011)


    Cadavre (10/26/2011)


    How's this?

    DECLARE @sql AS VARCHAR(MAX)

    SELECT @sql = COALESCE(@SQL + '; ', '') + sql_command

    FROM (SELECT 'USE ' + QUOTENAME(name) +

    ...

Viewing 15 posts - 1,711 through 1,725 (of 18,926 total)