Forum Replies Created

Viewing 15 posts - 211 through 225 (of 8,731 total)

  • RE: Unpivot query

    Something like this could work if I understood correctly.

    SELECT u.ColumnName,
      u.ColumnValue
    FROM tabDemo
    CROSS APPLY (VALUES( 'Product Group', ProductGroup), ('Contact Type', ContactType)) AS u(...

    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: The SQL Joke Thread

    Sue_H - Wednesday, February 13, 2019 2:03 PM

    sgmunson - Wednesday, February 13, 2019 1:51 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: SQL Script

    I just noticed that there's sample data posted now. Here's a solution that will pivot the data.

    WITH Unpivoted 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: SQL Script

    k.karthik0889 - Wednesday, February 13, 2019 3:32 AM

    /*I have tried using Row Number and Left outer join to display the data in...

    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: The Funny Stored Procedure Name

    Thom A - Tuesday, February 12, 2019 9:04 AM

    Sean Lange - Tuesday, February 12, 2019 8: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: A real doozie!

    The only thing that I could be happening is with the large gender column on your temp table.  Maybe you have some non-visible characters in there.
    Here's an example:

    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: truncation error on varchar(max) column

    mjohnson 71479 - Tuesday, February 12, 2019 10:22 AM

    I have a table that I use to log validation messages received by users...

    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: SSIS Question

    Admingod - Friday, February 8, 2019 3:33 PM

    I have approx 500 tables needed to be loaded to destination with similar table structure....

    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: A real doozie!

    Please post the table definitions for NAME_MASTER, temp_ad_act_20190208 and BIOGRAPH_MASTER. Or at least post the definitions of the columns used.
    This has probably nothing to do with your problem, but 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: Characters are changing after an alter table alter column executed?

    Thinky Night - Monday, February 11, 2019 10:52 PM

    Hi dears,

    Some problems occured during an ALTER TABLE ALTER COLUMN statement.

    My SQL Server Instance...

    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: Current Date to Week Start Date

    Here are the formulas to get the values you want. It's basically adding weeks to known dates. I'm using days instead of weeks to be able to add or substract...

    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?

    Ed Wagner - Monday, February 11, 2019 10:41 AM

    First of all, I agree with you - I think Stack Overflow did...

    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 Script

    Raghavender Chavva - Monday, February 11, 2019 10:49 AM

    Let me know consumable format means ?

    Read the articles linked in my signature...

    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 Script

    Raghavender Chavva - Monday, February 11, 2019 10:10 AM

    Hi All,

    Could you please help me in get the script for below scenario:

    Orginal 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: Columnstore Indexes - do we need to perform any maintenance on them?

    Grant Fritchey - Friday, February 8, 2019 11:53 AM

    Jeff Moden - Friday, February 8, 2019 9:36 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

Viewing 15 posts - 211 through 225 (of 8,731 total)