Forum Replies Created

Viewing 15 posts - 1,336 through 1,350 (of 8,731 total)

  • RE: Unpivot column to rows dynamic sql

    Here's another alternative. IMO it's more flexible as it would allow multiple columns in a single unpivot and work with the column names.
    It's explained on the following article:

    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?

    jonathan.crawford - Thursday, April 27, 2017 9:23 AM

    Sean Lange - Thursday, April 27, 2017 9:16 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: Are the posted questions getting worse?

    Brandie Tarvin - Wednesday, April 26, 2017 11:38 AM

    I'm in the phonebook! I EXIST! I'm in the phonebook!

    (or something like that)

    I...

    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?

    bmg002 - Wednesday, April 26, 2017 10:22 AM

    Sean Lange - Wednesday, April 26, 2017 9:53 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: Are the posted questions getting worse?

    Sean Lange - Wednesday, April 26, 2017 9:35 AM

    Lynn Pettis - Wednesday, April 26, 2017 9:31...

    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?

    Brandie Tarvin - Wednesday, April 26, 2017 9:21 AM

    Lynn Pettis - Wednesday, April 26, 2017 9:19 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: Are the posted questions getting worse?

    Lynn Pettis - Wednesday, April 26, 2017 9:03 AM

    You have to know who shot first, Han or Greedo.

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

    Sean Lange - Wednesday, April 26, 2017 8:41 AM

    Ed Wagner - Wednesday, April 26, 2017 8:32 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 to Pivot table in sql

    Better do things right from the beginning. Don't pivot to later unpivot and pivot again. Do a single pivot.
    Here's an example:

    SELECT CASE WHEN SSD.[CategoryID] =...

    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 Pivot table in sql

    Thom A - Wednesday, April 26, 2017 2:15 AM

    How about this:
    --Create Sample Table
    CREATE TABLE #Sample
      (Patent varchar(3),
      Novelty int,
     ...

    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: calculate previous month

    coool_sweet - Wednesday, April 26, 2017 5:56 AM

    i am trying to learn something here ok not copying or doing any cheating

    this is...

    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: Convert name field from Colunm1: FirstName LastName to Column2 as LastName, FirstName

    Warnings were made, so here's a possibility.

    SELECT SUBSTRING(FullName, CHARINDEX(' ', FullName) + 1, 8000) + ', '
      + LEFT(FullName, CHARINDEX(' ', FullName) -...

    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: Convert name field from Colunm1: FirstName LastName to Column2 as LastName, FirstName

    nickman - Tuesday, April 25, 2017 7:50 AM

    I have a column FullName with data as follows:
       John Doe
       Joe Doe
       Jane Doe

    I want...

    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?

    Hugo Kornelis - Monday, April 24, 2017 3:40 PM

    bmg002 - Monday, April 24, 2017 2:17 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-Type-Star-or-1-With-the-EXISTS-Logical-Operator

    By the way, thank you for writing about this.
    I actually had a conversation on the same subject with a co-worker today (and with another one some days ago)....

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