CREATE TABLE [dbo].[Deneme](
[Id] [int] NULL,
[OrderCode] [nvarchar](50) NULL,
[Name] [nvarchar](50) NULL,
[Quantity] [int] NULL,
[Description] [nvarchar](50) NULL
)
SELECT [Id]
,[OrderCode]
,[Name]
,[Quantity]
,[Description]
FROM [TimEntegrasyonMusteri].[dbo].[Deneme]
SELECT
OrderCode
,Name
,ROW_NUMBER() OVER(PARTITION BY Id ORDER BY Id asc)
,Quantity
,Description
FROM [TimEntegrasyonMusteri].[dbo].[Deneme] tbl,
(SELECT number
FROM master..spt_values
WHERE Type = 'P') n
WHERE tbl.Quantity > n.number
Hiç yorum yok:
Yorum Gönder