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

Related articles

STUFF ile istenilen alana ait değerleri “,” ile bir araya getirme

SELECT T2.FieldSomething, STUFF(( SELECT ‘,’ T1.Field FROM Table1 T1 WHERE T1.IDField =T2.IDField ORDER BY T1.Field FOR XML PATH(”) ), 1, 1, ”) AS FieldName FROM Table2 T2  

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