Forum Replies Created

Viewing 15 posts - 121 through 135 (of 276 total)

  • RE: Best solution for compounded update?

    J Livingston, how are you able to reference "cte" from within the definition of cte?

    inner join cte on b.IncreaseId = cte.IncreaseId +1


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Best solution for compounded update?

    Since you posted in the SQL2014 forum I assumed you had the latest version. But 2008 also has windowing functions which you should look into and understand. Very powerful. As...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Best solution for compounded update?

    The QuirkyUpdate method is the fastest by far. But if you want to try something that is perhaps better documented and with more easily google-able tutorials available online, you can...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Control of Flow - where is CASE ?

    You can use this type of conditional logic in stored procedures. Dunno if that's stating the obvious or not.


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: UPDATE using table alias

    I like the consistent "U" idea. Glad I'm not the only one using aliases in my update statements.

    Anyone else care to chime in here? Particularly with regards to SQL...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Thank you so much for the ideas Jacob. The problem has spread to a second costcenter today, so I reached out to IBM to see what they can do. (Not...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    I'm not sure if there's anything else to be done here, but I did want to update you on things.

    After our DBA ran all her behind-the-scenes wizardry, rebuilding indexes...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Awesome, thanks, have not used that hint before. Will give it a go! 🙂


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Thanks, as far as I know, OPTION (RECOMPILE) is only for stored procedures.


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Thanks Eduard, I do understand what you're saying and I agree. But this issue is separate from Cognos being a pile of crap. The issue is reproducible in pure SQL...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Thanks again, Chris and Sean. I realize this was not the most appealing post to reply to, but your replies mean a lot to me.

    Our DBA updated all the...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Thanks for catching that, Chris, I will have to ask our DBA as soon as I get into work today and do some Googling. I'm totally new to the whole...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Certain Value In Where Clause Hangs Query For 5 Minutes

    Thanks Sean, I was very reluctant to post here due to those obvious reasons. But I'm at the end of the road here as far as troubleshooting. Unfortunately indexing is...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: Efficient way to insert from foreign key lookups.

    ?

    INSERT INTO dbo.LiveTable

    (Information, MachineID, StatusId)

    SELECT Staging.Information, dbo.Machine.MachineId, dbo.Status.StatusId

    FROM dbo.Staging

    JOIN Machine ON Machine.MachineName = Staging.MachineName

    JOIN STATUS ON Status.Status = Staging.Status

    WHERE NOT EXISTS

    (

    ...


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

  • RE: What account to use for Identity when creating a Credential and to use as the job owner?

    In my organization, the whole SQL Agent/proxy account thing never panned out for me. We ended up using Windows Scheduler instead.


    "If I had been drinking out of that toilet, I might have been killed." -Ace Ventura

Viewing 15 posts - 121 through 135 (of 276 total)