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

Veritabanındaki Tablodan Class Üretmek (Generate Class from database table)

declare @TableName sysname = ‘TableName’ declare @Result varchar(max) = ‘public class ‘ + @TableName + ‘ {‘ select @Result = @Result + ‘ public ‘ + ColumnType + NullableSign + ‘ ‘ + ColumnName + ‘ { get; set; } ‘ from ( select replace(col.name, ‘ ‘, ‘_’) ColumnName, column_id ColumnId, case typ.name when ‘bigint’ […]

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

Bir yanıt yazın

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