Viewing 15 posts - 1,771 through 1,785 (of 4,087 total)
select a.*,
avg(salary)...
March 27, 2017 at 9:48 am
March 27, 2017 at 9:31 am
update dbo.User_table...
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...
March 24, 2017 at 1:45 pm
March 23, 2017 at 12:46 pm
Please don't create multiple threads for the same issue.
Please respond here
March 23, 2017 at 12:45 pm
This gives the exact same results. Why doesn't DENSE_RANK work?
because of my stupidity. I...
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...
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
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
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
March 23, 2017 at 12:11 pm
sPU.actual_departure >= dateadd(mm, datediff(mm, 0, getdate()), 0)
you would write...
March 23, 2017 at 12:09 pm
1) WHY?!?!?! They're horribly inefficient.
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.
March 23, 2017 at 12:01 pm
If you want help, you should post data in a CONSUMABLE format. An Excel file is not consumable.
This is consumable:DECLARE @Policies TABLE(MRN INT, [Primary Policy #]...
March 23, 2017 at 11:11 am
Viewing 15 posts - 1,771 through 1,785 (of 4,087 total)