Viewing 6 posts - 1 through 6 (of 6 total)
---- drop the recursion into a static table
if object_id('dbo._numbers') is null --- drop table dbo._numbers
...
October 14, 2013 at 12:51 am
-- f.e.: to split the comma delimited string into rows without using LOOP, CTE, XML.
declare @p nvarchar(max) = '', @start datetime
select @p += name + ',' from master.sys.sysobjects
select items...
October 11, 2013 at 4:27 am
fine, but correct is 'Careful with '
(no rtrim and lower used)
May 14, 2010 at 12:45 am
you can use char/patindex as IN operator:
where birthday is not NULL and charindex(cast(datepart(month, birthday) as varchar(8)) + ',', '1,3,4,5,7,8,') > 0
May 5, 2008 at 1:29 am
-- Execute batch in the old DB
-- Execute result in new DB
-- Script permissions on all tables
-- Author: Th. Fuchs, IMC GmbH Chemnitz
declare @object int, @hresult int, @property varchar(255), @return...
September 19, 2006 at 3:19 am
-- or (not for millseconds)
if object_id('dbo.udf_IsShiftValid') is null
execute('create function dbo.udf_IsShiftValid() returns integer as begin return 12 end')
go
alter function dbo.udf_IsShiftValid
(@StartTime datetime
, @EndTime datetime
, @DayTime datetime)
RETURNS integer
AS...
December 2, 2005 at 6:12 am
Viewing 6 posts - 1 through 6 (of 6 total)