What do you want to save?
Add Code snippet
New code examples
-
SQL 2022-02-03 09:03:35
create a quick temp table with stored procedure sql
/* First you need to create a table type. */ CREATE TYPE Names AS TABLE (Name VARCHAR(10)) ; GO /* Next, Create a procedure to receive data for the table-valued parameter, the table of names and select one item from the table*/ CREATE PROCEDURE Ch... Add solution -
SQL 2021-11-17 00:18:13
sql server convert to guid
DECLARE @uuid VARCHAR(50) SET @uuid = 'a89b1acd95016ae6b9c8aabb07da2010' SELECT CAST( SUBSTRING(@uuid, 1, 8) + '-' + SUBSTRING(@uuid, 9, 4) + '-' + SUBSTRING(@uuid, 13, 4) + '-' + SUBSTRING(@uuid, 17, 4) + '-' + SUBSTRING(@uuid, 21, 12) ... Add solution -
C# 2021-11-06 03:53:19
c# generate insert statement from object
select @@trancount; SET FMTONLY ON select * from dbo.Customers SET FMTONLY OFF exec ..sp_tablecollations_100 N'[dbo].[Customers]' insert bulk dbo.Customers ([Id] UniqueIdentifier, [LastName] NVarChar(255) COLLATE Latin1_General_CI_AS, [FirstName] NVarChar... Add solution -
SQL 2021-10-16 03:48:07
sql find longest running job step
/*============================================= Variables: @MinHistExecutions - Minimum number of job step executions we want to consider @MinAvgSecsDuration - Threshold for minimum job step duration we care to monitor @HistoryStartDate ... Add solution -
C# 2021-10-06 06:52:03
c# linq sorting sequential guids
// https://stackoverflow.com/questions/48806510/descending-order-in-listguid-is-different-then-iqueryable-orderbydescending // A cast to System.Data.SqlTypes.SqlGuid is needed to perform the same in-memory linq-sorting-result in comparison to SQL-Server s... Add solution -
C# 2021-08-27 12:19:02
convert table to Csharp class
declare @TableName sysname = 'TableName' declare @Result varchar(max) = 'public class ' + @TableName + ' {' select @Result = @Result + ' public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; } ' from ( select replace(co... Add solution