Sorgu sonucuna satır no alanı eklemek:
SELECT [URUN] ,[MAKINE] ,[ONCELIK] ,[KOVAN] ,[SNO] ,ROW_NUMBER() OVER(ORDER BY URUN,MAKINE,ONCELIK) AS KayitNo FROM [MACELLAN].[dbo].[PNTFICRONURNALTRMK] ORDER BY URUN,MAKINE,ONCELIK
URUN | MAKINE | ONCELIK | KOVAN | KayitNo |
BCS40K | L411/412 | 1 | 400 | 1 |
BGS45T | L12/512 | 1 | 400 | 2 |
BOHCA1 | L411/412 | 1 | 400 | 3 |
D00NAK | HF Super VM | 2 | 400 | 4 |
D00NAK | L409/416 | 1 | 400 | 5 |