Forum Replies Created

Viewing 15 posts - 10,801 through 10,815 (of 15,376 total)

  • RE: Are the posted questions getting worse?

    Lynn Pettis (9/6/2012)


    Steve Jones - SSC Editor (9/4/2012)


    OK, not my day. Not sure how to break the news here that this person is in way, way, over their head.

    http://www.sqlservercentral.com/Forums/Topic1353224-2799-2.aspx#bm1354093

    Okay, you're...

  • RE: Recursively calculate date intervals

    sku370870 (9/6/2012)


    Unfortunately, the 8 or so apps that use this database - which are all timeline driven - don't use a calendar table. In other apps I have a calendar...

  • RE: Combining multiple rows into one row for each id number

    pelusodm (9/6/2012)


    I need to combine multiple rows into one row for each id number so that I can display multiple corresponding trans_amt columns for each person. A person may have...

  • RE: Help Required

    a4apple (9/6/2012)


    CREATE TABLE Iss

    (

    id BIGINT,

    name Varchar(50)

    )

    CREATE TABLE Jou

    (

    id BIGINT,

    iss_id BIGINT,

    created_on DATETIME

    )

    CREATE TABLE Jd

    (

    id BIGINT,

    jou_id BIGINT,

    VARCHAR(10),

    old_value varchar(10),

    new_value varchar(10)

    )

    CREATE TABLE

    (

    id BIGINT,

    name BIGINT

    )

    INSERT INTO (id, name) values (1,'Phase')

    INSERT INTO (id,...

  • RE: Recursively calculate date intervals

    sku370870 (9/6/2012)


    Thank you both very much for your help. I was slow replying to Mark to thank him as I was working on the most awful bit of code -...

  • RE: [SQL Server 2005] Problem with ORDER BY clause

    cms9651 (9/6/2012)


    The rule for the sorting is mat geographic NAME.

    MAW = My Area West

    MAE = My Area East

    MAC = My Area Center

    MAS = My Area South

    Ahh there is the challenge...

  • RE: [SQL Server 2005] Problem with ORDER BY clause

    cms9651 (9/6/2012)


    Eugene Elutin (9/6/2012)


    The MAT column will be ordered randomly, but Tot will still come as a last one per DVD.

    I agree, that setup needs clarification about Total: is it...

  • RE: Please Help on Trailing spaces

    ScottPletcher (9/6/2012)


    Jeff Moden (9/6/2012)


    ScottPletcher (9/6/2012)


    I don't think audit triggers are relevant any more, given the better options built into SQL itself now.

    I've not found those options to do so well.

    Interesting....

  • RE: Performance issue

    sunny.tjk (9/6/2012)


    Lynn Pettis (9/6/2012)


    sunny.tjk (9/6/2012)


    I'll be sending the execution plan in a bit.

    I've a question, I ran the following query and when I looked at the execution plan it's just...

  • RE: [SQL Server 2005] Problem with ORDER BY clause

    Eugene Elutin (9/6/2012)


    Sean Lange (9/6/2012)


    ...

    This query will produce the same results:

    SELECT

    COALESCE ([MAT], 'Tot') AS [MAT],

    [DVD],

    SUM ([SALES])

    FROM

    TestTable

    GROUP BY

    (MAT),

    [DVD] --with rollup

    ORDER BY

    [DVD] DESC

    ...

    Try to add one more data row:

    INSERT INTO...

  • RE: [SQL Server 2005] Problem with ORDER BY clause

    The rollup option suggested previously is not what you want here. I have to admit I don't quite understand why your query is so complicated. It seems you introduced a...

  • RE: Performance issue

    derek.colley (9/6/2012)


    Point taken, it's a join, not processed row-by-row, so not subject to overhead of 'decoding' the date functions then comparing, then doing over again in a loop. So...

  • RE: Please Help on Trailing spaces

    I'm not much of a dev guru so can't test this from an external application call, but I reckon it would be possible to fool a call to the SP...

  • RE: Performance issue

    Actually the functions in your where clause should not render nonSARGable as Derek suggested because it is not a row based call.

    It is pretty hard to tell why the...

  • RE: Please Help on Trailing spaces

    derek.colley (9/6/2012)


    Jeff Moden (9/6/2012)

    Try it. You'll find that it's not susceptible to injection because it's not being used in dynamic SQL.

    Good point. You'd merely get the string inserted...

Viewing 15 posts - 10,801 through 10,815 (of 15,376 total)