Forum Replies Created

Viewing 15 posts - 1,201 through 1,215 (of 8,416 total)

  • RE: Returning a column per date in a range

    drew.allen (1/12/2012)


    ...the OP doesn't have ANY code in place and is looking for the best solution...

    The thread starter was not Bob Cullen (the chap playing around with an alternative solution...

  • RE: Quick Opinion on @@ROWCOUNT vs EXISTS

    Tom Brown (1/12/2012)


    And some important missing data. CODE now has a unique index, It was one of those 'assumed' "things the application could never let duplicates...

  • RE: Slow Query

    Couple of small index tweaks (just to add an extra included column):

    CREATE NONCLUSTERED INDEX

    [IX_SuggestedBy_JLG]

    ON [dbo].[transactions_recon]

    (

    [TRWEEK] ASC,

    [TRDATE] ASC,

    [TRTIME] ASC,

    [RecID] ASC

    )

    INCLUDE ([TRSITID],[TRPRODID],[Qty],[recordkey],OPIS) -- Added OPIS

    WITH...

  • RE: Returning a column per date in a range

    ChrisM@home (1/12/2012)


    Paul, I assumed that you were suggesting that it's ok if the number of rows is not only small but is restricted, and I must admit I was more...

  • RE: Grouping

    mukti.roy (1/12/2012)


    I think paul last Query and my Query both are same.

    They will produce exactly the same results, yes. My comments would be that you should avoid the NOLOCK...

  • RE: Returning a column per date in a range

    Jeff and Chris,

    You've missed the point I was making, and have chosen to assume that I am either (a) not aware of the performance issues involved; or (b) that I...

  • RE: Quick Opinion on @@ROWCOUNT vs EXISTS

    Tom Brown (1/12/2012)


    ...and will probably be more efficient than the OUTPUT or MERGE methods, given an index on CODE.

    I do understand your practical reasons for preferring option 2 (though...

  • RE: Execution Plan

    nirnaykhatri (1/11/2012)


    I am new to this website.....I just wanted to know how to upload pics and stuff here just like you uploaded yesterday?

    When you are writing a post, there is...

  • RE: Today's Random Word!

    Evil Kraig F (1/11/2012)


    Revenant (1/11/2012)


    SQLRNNR (1/11/2012)


    shrink

    wrap

    Gifts

    SSC's Got Talent

  • RE: Count fields that do not meet specified condition

    Give this a whirl:

    SELECT

    S.SERVERIP,

    ISNULL(C.VIDCOUNT, 0) AS VIDCOUNT

    FROM

    (

    -- Distinct server list

    SELECT DISTINCT...

  • RE: if 2nd year and same Programme for same Student, then return no results

    drew.allen (1/11/2012)


    That's true, but this statement from the original poster sounds like the GROUP BY is the correct version.

    kevin_nikolai (1/10/2012)


    If NOT 1st year and same Programme for same Student, then...

  • RE: SQL Server equivalent to DB2 HEX

    Greg Snidow (1/11/2012)


    Thank you both for the tips. After doing some research (google), I believe I am working with a packed decimal field. I suspected this was the...

  • RE: Count fields that do not meet specified condition

    c2k (1/11/2012)


    Thank you for the replies. I am trying Paul's suggestion first which utilizes 'UNION ALL'

    Please don't! My post was aimed at Cold Coffee, and was for interest only....

  • RE: Need to audit update without cursor

    If you are running Enterprise Edition, you also have the option of Change Data Capture.

  • RE: How to insert multiple rows into a table with identity column

    drew.allen (1/5/2012)


    IDENTITY is a number that is unique for a given table. PERIOD.

    Not without something to enforce that uniqueness it isn't. 😛

    CREATE TABLE #T (id int IDENTITY(1,1) NOT NULL)

    INSERT...

Viewing 15 posts - 1,201 through 1,215 (of 8,416 total)