Forum Replies Created

Viewing 15 posts - 616 through 630 (of 2,007 total)

  • RE: Bad Excution plan vs Good execution plan

    Please read these blog posts by Gail Shaw: -

    Parameter Sniffing Part 1[/url]

    Parameter Sniffing Part 2[/url]

    Parameter Sniffing Part 3[/url]

    In your sproc, try adding the hint "OPTION RECOMPILE" to your query. Read...

  • RE: Cube Goodies

    A former colleague's mother was a chef before she retired (She's the one that compiled this book for charity[/url]). So to keep herself busy, she now bakes and continuously gives...

  • RE: need to replace

    dwain.c (6/17/2012)


    On the other hand, perhaps the solution is as simple as this:

    DECLARE @t TABLE (column1 VARCHAR(20))

    INSERT INTO @t

    SELECT 'p = 30'

    UNION ALL SELECT 'q = 50'

    UNION ALL SELECT 'r...

  • RE: Order column with multiple dots in number

    You should do this in the presentation layer, rather than the database layer.

    If for some reason can't and have to do it in the database layer, you could do it...

  • RE: need help with autoincrementing an int column

    For arguments sake, I suspect this is the sort of thing you were looking for: -

    SELECT

    ROW_NUMBER() (ORDER BY (SELECT NULL)) + b.idSeed

    cast(SiteID AS INT) AS SiteID,

    cast(substring(SLXID, 1, 12)...

  • RE: Please Provide me suitable solution

    anand1310g (6/12/2012)


    Clean the table from old values

    - Get the new values in with format utf-8 from the .flat-files

    - ...

  • RE: Query to return 1 or unique value

    ChrisM@Work (6/13/2012)


    You're absolutely right.

    Even with the window function removed, the original code is faster. It simply looks like it might be inefficient.

    Never underestimate the value of a good test.

    Cadavre,...

  • RE: ordering table content

    Sample data for use: -

    SELECT level, parent, child, info

    INTO #yourTable

    FROM (VALUES(1,1234,1237,'some remarks'),

    (1,1234,1238,'extra remarks'),

    ...

  • RE: Query to return 1 or unique value

    Is that really any better Chris? I make it, at best the same or slightly worse.

    Test 1

    SELECT *

    INTO #test

    FROM (SELECT 221

    UNION ALL...

  • RE: can we get this guy banned from the forums?????

    My apologies, it was never my intention to kick off this little storm :blush:

    --edit--

    Having read through it all, I think it all started due to my laziness in quoting Michael's...

  • RE: Dynamic SQL

    Beginner2012 (6/11/2012)


    Hello,

    Upon executing the following code I get this error:

    -------------------------------------------------

    Msg 137, Level 15, State 1, Line 1

    Must declare the scalar variable "@MtCount".

    -------------------------------------------------

    I need to store the count in a variable...

  • RE: Your development/workstation laptop

    I have a HP ProLiant N40L MicroServer at home. It's not exactly top of the range, but for work I want to look at when I'm at home it's pretty...

  • RE: can we get this guy banned from the forums?????

    mtassin (6/4/2012)


    If you gave me this answer, I'd put you lower on the list, because that's a loop and solving this with a loop is RBAR.

    That said, of the 10...

  • RE: A-Z list

    Lynn Pettis (6/1/2012)


    Cadavre (6/1/2012)


    michael vessey (6/1/2012)


    im guessing that the OP wants

    Apples

    bannanas

    Chocolate

    Coffee

    turning into

    A

    Apples

    B

    Bannanas

    C

    Chocolate

    Coffee

    I really need to get one of those crystal balls that you guys all seem to have...

  • RE: A-Z list

    michael vessey (6/1/2012)


    im guessing that the OP wants

    Apples

    bannanas

    Chocolate

    Coffee

    turning into

    A

    Apples

    B

    Bannanas

    C

    Chocolate

    Coffee

    I really need to get one of those crystal balls that you guys all seem to have :w00t:

    I guess I'd...

Viewing 15 posts - 616 through 630 (of 2,007 total)