Forum Replies Created

Viewing 15 posts - 796 through 810 (of 8,731 total)

  • RE: Populate Acct Number (based on record above)

    Maybe something like this?

    UPDATE t SET
      MyAcctNumber = x.MyAcctNumber
    FROM #Test t
    JOIN (
      SELECT Id, LAG( Id,1,0) OVER( ORDER BY Id) LAGId,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Alternative to a table valued function in SQL Server

    It's hard to believe that changing it to an inline table-valued function won't improve performance. You could check the fact that you're using UNION that sorts and eliminate duplicates instead...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Order of the columns while creating an index

    Lynn Pettis - Wednesday, December 6, 2017 11:48 AM

    Determining whether I need a non-clustered index or a clustered index (there can be...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: FAST_FORWARD cursor slow for simple SELECT COUNT(*) because sp_cursorfetch() re-scans all index

    sf 49675 - Tuesday, December 5, 2017 11:57 AM

    Maybe there is some option in sp_cursorprepexec() to force to fetch the first...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: FAST_FORWARD cursor slow for simple SELECT COUNT(*) because sp_cursorfetch() re-scans all index

    sf 49675 - Tuesday, December 5, 2017 10:41 AM

    Hi all,

    We are using MS ODBC 13 (on Linux) to execute a simple SELECT...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query Help -

    Lynn Pettis - Tuesday, December 5, 2017 9:43 AM

    Luis Cazares - Tuesday, December 5, 2017 9:34 AM

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query Help -

    Lynn Pettis - Tuesday, December 5, 2017 9:17 AM

    That would have to be one hell of a long piece of dynamic...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query Help -

    Thom A - Tuesday, December 5, 2017 1:54 AM

    Lynn Pettis - Monday, December 4, 2017 4:33 PM

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Problem with SQL Stored Procedure

    MarkW.Rhythm1 - Tuesday, December 5, 2017 7:06 AM

    Sue_H - Monday, December 4, 2017 5:12 PM

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: what should i do to become a DBA

    afmatix - Tuesday, December 5, 2017 3:14 AM

    Sorry to resurrect this old thread but I have the same questions as raviveesha...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: "CASE" function on t sql

    You're declaring variables instead of parameters. You'll simply insert null values.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Sorting after records deleted

    webskater - Monday, December 4, 2017 6:08 AM


    CREATE