Forum Replies Created

Viewing 15 posts - 1,546 through 1,560 (of 8,731 total)

  • RE: How To Calculate The Execution Duration of an SSIS Package

    Are you sure that you're using the correct value from @[System::StartTime] ?

    Why do you have the negative  mark instead of fixing the DATEDIFF parameters?

    DECLARE...

    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?

    GilaMonster - Wednesday, February 22, 2017 6:30 AM

    jasona.work - Wednesday, February 22, 2017 6:23 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: Is there anything wrong with my DB design ?

    You have some columns that seem to be repeated in different tables such as DeptCode or MaterialName.
    There aren't many to many relationships between two tables, you need 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: Are the posted questions getting worse?

    jasona.work - Wednesday, February 22, 2017 5:48 AM

    Hugo Kornelis - Wednesday, February 22, 2017 4:47 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: How do I state my foreign key in my Create Table?

    Please disregard Joe Celko's rant. His design, although theorically correct, miss the physical design considerations. Using a CHAR(10) would add 6 bytes of storage to each row on Personnel and...

    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 update column with '

    Arjun SreeVastsva - Tuesday, February 21, 2017 1:53 PM

    hi.

    i need to update the column data with ' mark
    can any one provide the...

    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: Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period

    doug.brown - Tuesday, February 21, 2017 1:11 PM

    Just to toss it out there, you could potentially also use PARSENAME here:
    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: Converting Numbers to Letters

    Here's an option on how to do it.
    You might want to check the following articles to understand what's happening in the code and to get the function used.

    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 avoid cursors

    There's another way, but as mentioned before, it's not completely necessary to avoid a cursor in this case.
    Here's an example and a link on how to do it.

    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: Running Totals over multiple sets with a pivot

    Here's another option. I hope that it helps.

    SELECT t.ID,
      MAX( CASE WHEN d.RowNo = 1 THEN d.Description END) AS Desc1,
      SUM( CASE WHEN d.RowNo...

    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: Split columns if comma values exist for that columns

    You probably need to do this in 2 steps.
    First you need to split the values as shown here: http://www.sqlservercentral.com/articles/Tally+Table/72993/
    Then you would need to transpose the rows...

    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: Optimizing a query

    This might work for a single read on the Contacts table, but I can't guarantee any improvement or even correctness.

    SELECT S.Id,
     T.Id,
     SAC.Contacts_Id AS AssignedContacts_Id,

    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: Optimizing a query

    JKSQL - Monday, February 20, 2017 1:06 PM

    The Nolocks is how they want views written for reports so there are less page...

    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: Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period

    My preferred option is to add the character at the end of the string so it won't ever be 0.
    DECLARE @Failed TABLE(
    MachineNAme varchar(100))
    INSERT INTO @Failed

    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: Practice T-SQL

    89netanel - Sunday, February 19, 2017 8:44 AM

    Hello All,
    Do you know where i can find a project to train my T-SQL knowledge?
    from...

    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,546 through 1,560 (of 8,731 total)