No announcements
Found 3678424 threads
-
0 Votes
ROW_NUMBER for a computed column
Hi, the code that I'd like to use as a formula for the computed column is: ROW_NUMBER() OVER(ORDER by [YEAR], [MONTH]) FROM ...Answered | 9 Replies | 10816 Views | Created by pscorca - Friday, July 26, 2013 9:28 AM | Last reply by Dan Guzman - Saturday, July 27, 2013 3:05 PM -
0 Votes
Using Row_Number() in Pivot table in SSIS
You can do what you want using a Script Component.Answered | 2 Replies | 1104 Views | Created by Jeannette_81 - Thursday, March 24, 2016 8:19 PM | Last reply by Jeannette_81 - Friday, March 25, 2016 1:25 PM -
0 Votes
Update a column based on the Row_Number for previous row
You try below write code Create table Table_1 (ID varchar(10), create_date date, end_date date) Insert into ...Answered | 3 Replies | 1437 Views | Created by StudentOnline - Saturday, July 25, 2015 12:39 AM | Last reply by tusharshinde - Saturday, July 25, 2015 2:02 PM -
2 Votes
Common Table Expression - Error on ROW_NUMBER
USE DB1 ;WITH C AS ( SELECT ROW_NUMBER() OVER(PARTITION BY CONVERT(DATE, ProposalCreateDate) ORDER BY ProposalCreateDate, ProposalFirstPayment) AS ...Answered | 7 Replies | 1021 Views | Created by _Richard__ - Thursday, September 18, 2014 1:59 PM | Last reply by _Richard__ - Thursday, September 18, 2014 2:33 PM -
2 Votes
Need to SELECT DISTINCT and add ROW_NUMBER
) select *, row_number() over (order by Date_Stamp) as rn from cte where rn between 1 and 10 leaves to an "Invalid column name 'rn'.Answered | 6 Replies | 14621 Views | Created by LeSchtroumph - Monday, February 14, 2011 3:56 PM | Last reply by Mago Schmidt - Friday, August 9, 2013 12:32 PM -
0 Votes
Grouping question using ROW_NUMBER()
I think that unpivoting the data to count the distinct values per column will outperform using "count(*) over(...)Answered | 5 Replies | 5218 Views | Created by KDV - Thursday, August 5, 2010 3:12 PM | Last reply by KDV - Monday, August 9, 2010 2:30 PM -
0 Votes
How to use row_number & distinct
I would try to get rid of the temp table by using a CTE (Common Table Expression).Answered | 18 Replies | 11836 Views | Created by lax4u - Wednesday, July 15, 2009 1:49 AM | Last reply by RelationalCalculus - Monday, February 14, 2011 4:56 AM -
0 Votes
ROW_NUMBER()
select status , date, ROW_NUMBER() OVER(PARTITION BY STATUST ORDER BY DATE) RowNum from Table1;Answered | 4 Replies | 770 Views | Created by MSRN - Sunday, September 3, 2017 9:23 AM | Last reply by Will_Kong - Monday, September 4, 2017 2:52 AM -
1 Votes
row_number partition in an unordered column
;With cteIsland As (Select id, someval, localseqno, Row_Number() Over(Order By id) - Row_Number() Over(Partition By someval Order By id) As Island From ...Answered | 4 Replies | 1158 Views | Created by JRStern - Saturday, August 20, 2016 1:09 AM | Last reply by Naomi N - Thursday, August 25, 2016 11:18 AM -
0 Votes
Select into Temp Table Identity Column
I guess the error would be pointing here,So Try to Check with Column Names OF that Temptable along with Column Values used in Select Statement.Answered | 7 Replies | 4496 Views | Created by C-Sharp Mamba - Thursday, September 18, 2014 8:41 AM | Last reply by cnk_gr - Thursday, September 18, 2014 9:50 AM -
1 Votes
table using select
Yeah - you need the INTO keyword select ROW_NUMBER() over (ORDER BY TABLE_NAME) AS ...Answered | 4 Replies | 5286 Views | Created by prikshna - Sunday, February 13, 2011 4:15 PM | Last reply by prikshna - Sunday, February 13, 2011 4:50 PM -
2 Votes
Row_Number
Use ROW_NUMBER() OVER (ORDER BY YourUniqueColumn ASC or DESC) AS RowNumber.Answered | 6 Replies | 948 Views | Created by j2dt - Thursday, March 12, 2015 3:01 PM | Last reply by Guoxiong Yuan - Thursday, March 12, 2015 8:33 PM -
0 Votes
row_number, NTILE
NTILE can be used to create multiple groups based on either performance or anything else depending on how many groups you would like to create and on order by ...Answered | 4 Replies | 858 Views | Created by SQLDeveloper2012 - Thursday, October 16, 2014 6:48 PM | Last reply by Jiri Neoral - Thursday, October 16, 2014 9:43 PM -
1 Votes
How to Update a table with join from another table's columns with blank values?
Hi Abhi, You could use script below to get the result.Answered | 15 Replies | 670 Views | Created by h_abhijith - Friday, April 1, 2016 1:29 AM | Last reply by h_abhijith - Friday, April 1, 2016 1:04 PM -
0 Votes
Last updated column in a table
who,where & when updated a particular column of a table?Answered | 6 Replies | 2044 Views | Created by winoa - Tuesday, September 17, 2013 4:43 PM | Last reply by SaravanaC - Wednesday, September 18, 2013 5:44 AM -
1 Votes
unexpected result when using datename with row_number()
It can be created in under 3 seconds with lots of other useful information.Answered | 6 Replies | 1714 Views | Created by Knot - Wednesday, July 31, 2013 2:14 AM | Last reply by --CELKO-- - Thursday, August 1, 2013 6:49 PM -
1 Votes
Row_Number() in the SELECT DISTINCT: it counts also duplicated rows
One possibility is to use DENSE_RANK() or alternatively first select your data into derived table or CTE with DISTINCT and only then apply ROW_NUMBER()For every ...Answered | 1 Replies | 2809 Views | Created by fasttrack - Thursday, July 14, 2011 4:32 PM | Last reply by Naomi N - Thursday, July 14, 2011 4:52 PM -
0 Votes
SELECT ROW_NUMBER() OVER fast and slow what is going on?
Such as how much data is in the tables.Answered | 1 Replies | 5040 Views | Created by Uri Kluk - Friday, September 14, 2012 4:21 PM | Last reply by Iric Wen - Monday, September 17, 2012 3:15 AM -
1 Votes
Use ROW_NUMBER as a join to in a query.
Think about this means: ROW_NUMBER() OVER(PARTITION BY Introducer ORDER BY ...Answered | 7 Replies | 17097 Views | Created by _Richard__ - Tuesday, September 23, 2014 9:53 AM | Last reply by _Richard__ - Wednesday, September 24, 2014 11:10 AM -
0 Votes
Insert into and Row_Number() - From one table to another
I was absolutely confusing Insert and Update commands.Answered | 2 Replies | 2532 Views | Created by Jeannette_81 - Friday, March 25, 2016 7:52 PM | Last reply by Jeannette_81 - Friday, March 25, 2016 8:19 PM - Items 1 to 20 of 3678424 Next ›
No announcements