Forum Replies Created

Viewing 15 posts - 706 through 720 (of 8,731 total)

  • RE: how to do Intermediate calculations for partial rows based on a particular field

    Naveen PK - Wednesday, January 31, 2018 12:39 PM

    Luis Cazares - Wednesday, January 31, 2018 12:10 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: how to do Intermediate calculations for partial rows based on a particular field

    Naveen PK - Wednesday, January 31, 2018 11:24 AM

    In this example: 1c should have calculated value of (1b-1a) for that  KeyYear.
    4c ...

    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 performs poorly on prod server, works well when run against a restored copy of DB

    This might be obvious, but have you checked that it's not blocked by an open transaction?
    It happened to me once.

    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: Audit changes made by MSSMS

    mig28mx - Wednesday, January 31, 2018 9:19 AM

    Hi all,
    I´m implementing an audit requirement in our SQL server. The front end is an...

    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: SQL Server 2017 Developer Edition Download Size

    corkumortoo - Wednesday, January 31, 2018 9:42 AM

    Can anyone explain the discrepancy ins size of file and the download size?

    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: New destination column not saving

    Lord Slaagh - Wednesday, January 31, 2018 8:51 AM

    Hello SSC,

    I have a simple SSIS package with a Source and Destination. The Source...

    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: Remove duplicate record based on criteria

    And yet another option:

    WITH CTE AS(
      SELECT *,
       LAG(cs.Value1) OVER(PARTITION BY cs.DuplicatingValue ORDER BY cs.Value1 ) prev_Value1
      FROM dbo.CentralSample AS cs

    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: Remove duplicate record based on criteria

    Here's a different option that might be better, but you should still test for performance.

    WITH CTE AS(
      SELECT *,
       ROW_NUMBER() OVER(PARTITION BY...

    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: Are the posted questions getting worse?

    I started interacting with Pervasive SQL and it's frustrating. Why do people pay for a product that won't work as well as many other free products that have been well...

    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: Are the posted questions getting worse?

    jasona.work - Tuesday, January 30, 2018 9:20 AM

    Ever have one of those days where you know that as soon as you go...

    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: Should I add indexes to a log table?

    Maybe this would make the code easier to read and prevent any SQL injection.

    DECLARE @sql NVARCHAR(MAX);

    SELECT @sql = N'SELECT DISTINCT
      PARSENAME(SchemaName, 1)...

    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: Calculating a % based on table results

    cmw 66135 - Thursday, January 25, 2018 7:34 AM

    Thanks Jonathan that was exactly what I was trying to do

    🙂

    For more information on...

    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: Should I add indexes to a log table?

    river1 - Wednesday, January 24, 2018 1:11 PM

    One thing seems that we all agree. As this is purely a delete and insert...

    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: Should I add indexes to a log table?

    river1 - Wednesday, January 24, 2018 1:04 PM

    Jeff Moden - Wednesday, January 24, 2018 12:48 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: Should I add indexes to a log table?

    Something tells me that you would benefit more by having the clustered index on StartDateTime. I don't see how or why ExecutionID can be relevant to your queries.

    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 - 706 through 720 (of 8,731 total)