Forum Replies Created

Viewing 15 posts - 7,366 through 7,380 (of 8,731 total)

  • RE: Query Help- Unpivot

    Looking for a solution using UNPIVOT, I found this on BOL:

    null values in the input of UNPIVOT disappear in the output, whereas there may have been original null values 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: Query Help- Unpivot

    This is a possible solution for 2005 because it won't accept the VALUES table construct.

    SELECT cStudentID, Quarter, GPA

    FROM #Temp

    CROSS APPLY (SELECT 'CummulativeGPA', CummulativeGPA UNION ALL

    SELECT 'Q1GPA', Q1GPA UNION ALL

    SELECT 'Q2GPA',...

    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 Help- Unpivot

    You could use the CROSS APPLY approach[/url]:

    SELECT cStudentID, Quarter, GPA

    FROM #Temp

    CROSS APPLY (VALUES( 'CummulativeGPA', CummulativeGPA),

    ( 'Q1GPA', Q1GPA),

    ( 'Q2GPA', Q2GPA),

    ( 'Q3GPA', Q3GPA),

    ( 'Q4GPA', Q4GPA))x(Quarter, GPA)

    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: What are the New Things in Sql Server 2012

    Here's all the info:

    What's New in SQL Server 2012

    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 question

    You could use EXCEPT

    SELECT SSN , PKT , FICE_NBR

    FROM A

    EXCEPT

    SELECT SSN , PKT , FICE_NBR

    FROM B

    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: Sum 3 Pivot columns

    Could you post your complete SELECT statement? Even better, post DDL and sample data. I would recommend to change to cross tabs to facilitate this kind of problems.

    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 won't give same result on SQL 2000 and SQl 2008

    This is taken directly from Books OnLine:

    The order in which rows are returned in a result set are not guaranteed unless an ORDER BY clause is specified.

    If you need...

    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 won't give same result on SQL 2000 and SQl 2008

    Are you talking about column or row order?

    Column order is defined by the SELECT list or the ordinal position for the table definition in case you have a SELECT *.

    Row...

    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 few reflections on RBAR by a weary application developer

    Just to be clear. SSIS is not RBAR on its own. SSIS is a tool that can easily use the power of “Tresni Klub”.

    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: Timing Issue

    Are you using NOLOCK hints? This could be one cause.

    It would help a lot to see what the SP does.

    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: Parsing one record into multiple based on a date

    You can accomplish this by using a Tally table. If you don't know what it is, check the following article: http://www.sqlservercentral.com/articles/T-SQL/62867/

    In this example, I'm using a CTE for your sample...

    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: EAV query

    You could use a CROSS TABS[/url] approach.

    SELECT EntityID,

    MAX( CASE WHEN Attribute = 'Att' THEN Value END) AS Att,

    MAX( CASE WHEN Attribute = 'MyCol' THEN Value END) AS MyCol

    FROM EAV

    WHERE EntityType...

    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: Concatenating during an update?

    There's a possibility, but you must be careful when you apply it. Check the following article:

    http://www.sqlservercentral.com/articles/T-SQL/68467/

    Even if you can't use it, it's a great 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: Delcare variable for Multiple values paramter in SP ???

    Michael_Garrison (12/5/2013)


    Yes, read this article. I had to do learn same thing regarding multi valued params and stored procs. Using the JOIN and then in the stored proc...

    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: SQLServerCentral is issuing a public apology to Itzik Ben-Gan

    You might need to post in this thread http://www.sqlservercentral.com/Forums/Topic1519856-824-1.aspx, but I'm not sure. 😉

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