Kod Kütüphanem ama elime ne gelirse burada dursun diye…

Related articles

Dinamik Pivot Sütunlar SQL Server

DECLARE @cols AS NVARCHAR(MAX); DECLARE @query AS NVARCHAR(MAX); select @cols = STUFF((SELECT distinct ‘,’ + QUOTENAME(Name) FROM property FOR XML PATH(”), TYPE ).value(‘.’, ‘NVARCHAR(MAX)’) , 1, 1, ”); SELECT @query = ‘SELECT * FROM ( SELECT o.object_id, p.Name, o.value FROM propertyObjects AS o INNER JOIN property AS p ON o.Property_Id = p.Id ) AS t […]

Learn More

Group by Day – Örnekleri ile

Grouping By Day Of month: In order to group the data by day you can use sql server in built DAY() funtion. Grouping By Day Of week: For this you can use DATEPART(weekday,[date column]) Grouping By week: For this you can use DATEPART(week,[date column]) Grouping By DAY of Year: For this you can use DATEPART(dayofyear,[date […]

Learn More

SELECT yapısı içinde Önceki ve Sonraki Kayıt

SELECT LAG(p.FirstName) OVER (ORDER BY p.BusinessEntityID) PreviousValue, p.FirstName, LEAD(p.FirstName) OVER (ORDER BY p.BusinessEntityID) NextValue FROM Person.Person p       Kaynak: sqlauthority.com

Learn More

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir