Forum Replies Created

Viewing 15 posts - 1,441 through 1,455 (of 8,731 total)

  • RE: brain freeze on exists

    This should be the equivalent to the original query using EXISTS instead of IN.
    SELECT
      ap.AdminProduct_ID
      ,ap.RowVersionNumber
      ,ap.TherapyAdmin_ID
      ,ap.PackagedProduct_ID
      ,ap.AdminRecordMethod
      ,ap.ActionCode

    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: looping through INSERT results: what's the best way?

    rgouette - Monday, March 27, 2017 8:48 AM

    I've got an (AFTER INSERT)  trigger that I want to:
    1) parse the (multi-row) INSERTED table,...

    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: Solution to avoid TEMP tables and CTE's

    SQLRNNR - Friday, March 24, 2017 3:16 PM

    Luis Cazares - Friday, March 24, 2017 2:58 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: Solution to avoid TEMP tables and CTE's

    A different solution is to use views or derived tables instead of CTEs.

    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: How to create a cursor with select query

    This seems to be part of the problem from the following thread: https://www.sqlservercentral.com/Forums/1866309/Question-on-Outer-and-Inner-Cursor

    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: Question on Outer and Inner Cursor

    mcfarlandparkway - Thursday, March 23, 2017 1:02 PM

    No , My logic is different, I understand his example -
    But i have taken that...

    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: Question on Outer and Inner Cursor

    mcfarlandparkway - Thursday, March 23, 2017 10:32 AM

    I have a procedure where it has a Cursor now, I am planning to create...

    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: tuning help

    Tara-1044200 - Wednesday, March 22, 2017 2:30 PM

    following qry is taking more than 3 hrs to run , it has billion records...

    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: SELECT @local_variable '=' Versus SELECT @local_variable '+='

    jcelko212 32090 - Wednesday, March 22, 2017 11:05 AM

    The + = notation is a left over from the early Sybase days.....

    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: Windows Functions: Tell me when that changes.

    bc_ - Wednesday, March 22, 2017 12:43 PM

    ChrisM@home - Saturday, March 18, 2017 4:07 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: Hierarchy without cursor/loop

    ansaryarshad - Wednesday, March 22, 2017 3:52 AM

    Hi Thom,
    Sorry for the reply.
    I am coming from an SAP HANA background where CTEs...

    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: Data is getting deleted automatically from Database

    Sean Lange - Tuesday, March 21, 2017 7:37 AM

    vipinmittalmca - Tuesday, March 21, 2017 6:54 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: Hierarchy without cursor/loop

    ansaryarshad - Monday, March 20, 2017 12:01 PM

    Hi Thom,

    Thanks for the post . But the condtion

    E.MgrID = H.EmpID
     will not work...

    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: Dynamic Aggregate functions in SELECT

    There's no need for a CTE.

    SELECT Store_grp, Store,
      CASE
       WHEN Value1Aggr = 'MAX' THEN MAX(Value1)
       WHEN Value1Aggr = 'MIN' THEN...

    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: Hierarchy without cursor/loop

    Here's an option that might work better than a rCTE. This article was written from experience on a problem very similar to what you're describing.
    It uses a loop, but...

    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

Viewing 15 posts - 1,441 through 1,455 (of 8,731 total)