Viewing 15 posts - 1,576 through 1,590 (of 3,482 total)
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
This worked for me...
SELECT ModelNo
, ROW_NUMBER() OVER (ORDER BY ModelNo) AS RowNum
, SUM(Qty) AS TotalQty
, SUM(MLP) AS TotalMLP
, SUM(Discount) AS TotalDiscount
FROM...
March 16, 2017 at 6:29 pm
Is this homework? What have you tried? I have a solution... but show me how far you got.
This is the only "twist" at all.
[code...
March 16, 2017 at 5:51 pm
What type is User.ID? Sounds like it's an integer, and GETDATE does not return an integer, but a datetime.
March 16, 2017 at 5:35 pm
Could you post the CREATE TABLE and INSERT scripts for this?
If this is true: "Duplicated rows has to be consolidated by modelnumber and price column should be of...
March 16, 2017 at 5:14 pm
I find that I give an author some leeway if English isn't his first language. (Ferrari & Russo's stuff is a prime example - their English is quirky, but understandable)....
March 16, 2017 at 4:39 pm
Can't you do this? If you use TOP 100 PERCENT, you can use ORDER BY.
CREATE VIEW vwFirstInstances
AS
SELECT * FROM (
SELECT TOP 100 PERCENT...
March 15, 2017 at 10:31 pm
"having negative values should be treated as zero or ignored" - you would have to either deal with that in your stored procedure or create a calculated field to do...
March 14, 2017 at 11:06 pm
Viewing 15 posts - 1,576 through 1,590 (of 3,482 total)