Viewing 15 posts - 2,161 through 2,175 (of 10,144 total)
andrew_c_worth@yahoo.co.uk (9/24/2015)
CREATE TABLE [dbo].[TestEmail](
[Id] [int] IDENTITY(1,1) NOT NULL,
[nvarchar](200) NOT NULL,
[chk] [int] NOT NULL,
CONSTRAINT [PK_TestEmail] PRIMARY KEY CLUSTERED
(
[Id]...
September 24, 2015 at 10:20 am
WayneS (9/24/2015)
SELECT activityNameFROM #Activities
CROSS APPLY (SELECT PATINDEX('[A-Z,a-z][0-9]%', activityName),
...
September 24, 2015 at 7:39 am
SELECT activityName, SortOrder = x4.LeftChars + x6.NewRightNums + ' ' + x3.RightPart
FROM #Activities
CROSS APPLY (SELECT SpacePos = CHARINDEX(' ',activityName+' ')) x1
CROSS APPLY (SELECT LeftPart = LEFT(activityName,x1.SpacePos-1)) x2
CROSS APPLY (SELECT RightPart...
September 24, 2015 at 7:13 am
jkramprakash (9/24/2015)
i want to delete this records .
In this below example i want to delete all the records
which...
September 24, 2015 at 6:44 am
Is there any particular reason for storing the email address as NVARCHAR?
September 24, 2015 at 6:07 am
vipin_jha123 (9/24/2015)
;with cte AS (SELECT [ProgramId]
,[ProgramVersionId]
,[WRINPrefix]
...
September 24, 2015 at 5:30 am
Here's how you do it:
SELECT
s.*,
[ForecastDate] = DATEADD(DAY, x.n, s.ForecastStartDate)
FROM #STG s
CROSS APPLY (
SELECT TOP(1 + DATEDIFF(DAY, s.ForecastStartDate, s.ForecastEndDate))
n = -1 + ROW_NUMBER() OVER(ORDER BY (SELECT NULL))
FROM...
September 24, 2015 at 2:29 am
squvi.87 (9/24/2015)
Declare @var varchar(100)set @var = '2000'
select case when ISDATE(@var ) =1 then 'Valid Date' when ISDATE(@var ) =0 then 'Invalid Date' END
In the above code I...
September 24, 2015 at 1:52 am
steve.tarry (9/22/2015)
drop table ##ssselect 3 as nr, 'a' as kar, 1 as groupingcode into ##SS
insert into ##SS values
(9, 'C',1),
(15,'h',1),
(7, 'e',1),
(6, 'd',1),
(12,'z',1),
(4, 'b',1),
(5, 'q',1)
select * from ##SS
--
-- Get the first...
September 22, 2015 at 8:08 am
Plenty of scope for optimisation here - and the faster a batch completes, the less likely it is to cause a deadlock. I'd start with the nested cursor. Resolve your...
September 22, 2015 at 7:11 am
There's a couple of references to the 64/65 split in this article by Paul White. I'm sure I've seen something more comprehensive somewhere but the Google - force eludes me...
September 22, 2015 at 4:11 am
Brandie Tarvin (9/21/2015)
Eirikur Eiriksson (9/20/2015)
Is anyone memory optimized?😎
Not me. But now that I've seen that thread, I am curious.
IIRC Paul White has one or two articles which exploit...
September 21, 2015 at 4:44 am
Rod at work (9/11/2015)
Ed Wagner (9/11/2015)
September 11, 2015 at 9:56 am
Walton (9/11/2015)
I will try to replace NOT IN with LEFT JOIN and filtering out with left column of left table IS NOT NULL. It had helped me in many cases.
Have...
September 11, 2015 at 8:50 am
mohelsheikh (9/9/2015)
September 11, 2015 at 7:19 am
Viewing 15 posts - 2,161 through 2,175 (of 10,144 total)