Viewing 15 posts - 586 through 600 (of 2,894 total)
Mark-101232 (3/14/2013)
Eugene Elutin (3/14/2013)
March 14, 2013 at 3:43 am
"Looks like" - it just really "Looks like" nothing more. That is whole problem for recursive CTE's - they are fine for limited number of recursions, they not very well...
March 14, 2013 at 3:26 am
Alan.B (3/13/2013)
Eugene Elutin (3/13/2013)
declare @filename varchar(100)
set @filename = 'Notes_20130204_003015.txt';
select PARSENAME(replace(@filename,'_','.'),4)
select PARSENAME(replace(@filename,'_','.'),3)
select PARSENAME(replace(@filename,'_','.'),2)
select PARSENAME(replace(@filename,'_','.'),1)
Fantastic use of PARSENAME! Wow!
Not really. Quite slow one, actually. But will suite to the purpose...
March 13, 2013 at 3:32 pm
or you can use something like this:
DECLARE @time TABLE (StringTime VARCHAR(6))
INSERT @time
SELECT '112345'
UNION SELECT '12345'
UNION...
March 13, 2013 at 11:49 am
Those logtimes look sequential to me - are you sure?
What do you mean by "sequential"? These LogTimes are for the same UserId, they are unique and they grow in its...
March 13, 2013 at 10:58 am
Cause some log data can be a bit different.
Try this one:
SET DATEFORMAT dmy;
CREATE TABLE #Source (LogIndex int, UserID nvarchar (10), LogTime datetime, Tipo smallint);
CREATE TABLE #Temp (LogIndex int, UserID nvarchar...
March 13, 2013 at 9:33 am
Gail's blog recommends using dynamic SQL
but our boss doesn't like it at all.
Is your boss SQL Server professional or just an idiot with a lot of ambitions?
For what you're...
March 13, 2013 at 9:29 am
david.ostrander (3/13/2013)
I created a Store Procedure to have Table A sync with Table B by doing an insert of the data that it does not have.
The issue I'm...
March 13, 2013 at 9:20 am
declare @filename varchar(100)
set @filename = 'Notes_20130204_003015.txt';
select PARSENAME(replace(@filename,'_','.'),4)
select PARSENAME(replace(@filename,'_','.'),3)
select PARSENAME(replace(@filename,'_','.'),2)
select PARSENAME(replace(@filename,'_','.'),1)
March 13, 2013 at 9:15 am
ChrisM@Work (3/13/2013)
Eugene Elutin (3/13/2013)
Still running after 12 minutes.Some one around was looking for CPU killer query... I need to cancel that one!
Hahahaha!
I didn't say it would be faster, but...
March 13, 2013 at 9:02 am
Still running after 12 minutes.
Some one around was looking for CPU killer query... I need to cancel that one!
March 13, 2013 at 8:41 am
Let's try on 1,000,000 rows:
common test data setup parts:
SET DATEFORMAT dmy;
CREATE TABLE #Source (LogIndex int, UserID nvarchar (10), LogTime datetime, Tipo smallint);
CREATE TABLE #Temp (LogIndex int, UserID nvarchar (10), LogTime...
March 13, 2013 at 8:34 am
Yep, that is right now.
And it does look less code. But...
Cause it's based on recursive CTE and hidden triangular join (via cross apply), it's performance very unlikely be on...
March 13, 2013 at 6:14 am
ChrisM@Work (3/13/2013)
Eugene Elutin (3/13/2013)
I'm sure you didn't mark rows to be "ok" for UserId 01552 correctly, please check carefully!
01552 is correct, 01551 is incorrect:
;WITH OrderedData AS (
SELECT *, seq =...
March 13, 2013 at 5:57 am
I'm sure you didn't mark rows to be "ok" for UserId 01552 correctly, please check carefully!
SELECT IDENTITY(INT,1,1) RID,*, CAST(NULL AS BIT) AS Flag INTO #Work
FROM #TEMP ORDER BY UserId,...
March 13, 2013 at 5:15 am
Viewing 15 posts - 586 through 600 (of 2,894 total)