Viewing 15 posts - 1,576 through 1,590 (of 3,489 total)
Could you post your expected completed pivot given the data provided?
April 18, 2017 at 7:01 pm
Did you read Jeff Moden's article about crosstabs/pivots in T-SQL?
April 18, 2017 at 5:24 pm
"Not working" is not terribly helpful when diagnosing a query.
post the T-SQL for your query and maybe we can help.
For someone that's been here as long as...
April 18, 2017 at 12:02 am
Look up examples for CROSS APPLY and TOP... Here's Itzik's example from Itzik Ben-Gan on SQL 2008
SELECT D.orderID, D.productID, D.qty
FROM Sales.Orders AS O
CROSS APPLY
April 17, 2017 at 9:36 pm
use a correlated subquery and [NOT] EXISTS to find parent records with/without child records. Just too lazy/tired to sort out the mess without sample data.
April 11, 2017 at 12:13 am
Got some table definitions and some sample data and some expected results? You know, same old same old.
April 6, 2017 at 4:00 pm
I would like the calculation to display own the output window and/or the messages window when executing SSIS 2012 manager.
False. This is an SSIS question.
April 6, 2017 at 12:57 pm
your stored procedure won't even compile. Besides, there's no declaration of your output parameter. It's declared just like an input parameter, but it's got an OUTPUT tag on it.
April 6, 2017 at 11:13 am
CREATE TABLE DBs(Environ VARCHAR(4), SQLVersion VARCHAR(14));
SELECT Environ, SQLVersion, COUNT(*) AS Count
FROM DBs
GROUP BY Environ, SQLVersion;
April 5, 2017 at 6:08 pm
Like this is one way...CREATE TABLE #Test(
RowID INT IDENTITY,
EmpID CHAR(5) DEFAULT 'JDOE3',
ManagerID CHAR(6),
Yr INT,
...
April 4, 2017 at 9:38 pm
Sounds like you are trying to do this with an INNER JOIN instead of an OUTER JOIN. If you right-click on the join between the two tables, you can change...
April 2, 2017 at 11:58 am
look at RANK() and DENSE_RANK() windowing functions
March 31, 2017 at 6:43 pm
what is the Value of all Approvals for Payments made in Year 2017
...Where is your Calendar table? Then you can do time-based summaries, like this:
[code...
March 28, 2017 at 8:40 pm
So where does [BuyMultiplier] fit into the answer? How does it change the expected result? If you group by both ModelNo and BuyMultiplier, you will get one record for each...
March 16, 2017 at 9:55 pm
March 16, 2017 at 8:02 pm
Viewing 15 posts - 1,576 through 1,590 (of 3,489 total)