Viewing 15 posts - 1,771 through 1,785 (of 4,086 total)
Now that I'm officially unemployed, I finally got around to downloading SQL 2016 developer edition to play around with. Right now, the two most frustrating things are that they changed...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 27, 2017 at 10:17 am
select a.*,
avg(salary)...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 27, 2017 at 9:48 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 27, 2017 at 9:31 am
update dbo.User_table...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 24, 2017 at 2:04 pm
This should be done in the presentation layer, not the database layer. SQL Server is highly typed, which means that all of the values in a column have to have...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 24, 2017 at 1:45 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:51 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:46 pm
Please don't create multiple threads for the same issue.
Please respond here
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:45 pm
This gives the exact same results. Why doesn't DENSE_RANK work?
because of my stupidity. I...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:41 pm
; WITH a AS
(
SELECT id, tablebid, ROW_NUMBER() OVER(ORDER BY id) AS rn
FROM TableA
)
, b AS
(
SELECT tablebid, ROW_NUMBER() OVER(ORDER BY tablebid) AS...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:32 pm
This gives the exact same results. Why doesn't DENSE_RANK work?
; WITH [a] AS
(
SELECT 9990 [col1] UNION ALL
SELECT 9990 UNION ALL
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:24 pm
I see nothing here that requires a cursor. You aren't even using the variables. Simply get rid of the cursor.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:19 pm
Use DENSE_RANK instead of ROW_NUMBER. From the data given, you do not want a partition.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:11 pm
sPU.actual_departure >= dateadd(mm, datediff(mm, 0, getdate()), 0)
you would write...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:09 pm
1) WHY?!?!?! They're horribly inefficient. J. Drew Allen
2) How to create a CURSOR You haven't given enough information, but this link will give you the basics.
3) WHY?!?!?! They're horribly inefficient.
Business Intelligence Analyst
Philadelphia, PA
March 23, 2017 at 12:01 pm
Viewing 15 posts - 1,771 through 1,785 (of 4,086 total)