Viewing 15 posts - 7,366 through 7,380 (of 8,731 total)
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...
December 10, 2013 at 10:01 am
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',...
December 10, 2013 at 9:55 am
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)
December 10, 2013 at 9:16 am
You could use EXCEPT
SELECT SSN , PKT , FICE_NBR
FROM A
EXCEPT
SELECT SSN , PKT , FICE_NBR
FROM B
December 9, 2013 at 4:10 pm
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.
December 9, 2013 at 3:55 pm
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...
December 9, 2013 at 10:19 am
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...
December 9, 2013 at 9:44 am
Just to be clear. SSIS is not RBAR on its own. SSIS is a tool that can easily use the power of “Tresni Klub”.
December 9, 2013 at 8:32 am
Are you using NOLOCK hints? This could be one cause.
It would help a lot to see what the SP does.
December 6, 2013 at 3:13 pm
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...
December 6, 2013 at 2:22 pm
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...
December 6, 2013 at 11:58 am
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. 🙂
December 5, 2013 at 4:56 pm
Michael_Garrison (12/5/2013)
December 5, 2013 at 3:16 pm
You might need to post in this thread http://www.sqlservercentral.com/Forums/Topic1519856-824-1.aspx, but I'm not sure. 😉
December 5, 2013 at 12:57 pm
Viewing 15 posts - 7,366 through 7,380 (of 8,731 total)