Viewing 15 posts - 6,406 through 6,420 (of 10,143 total)
You can certainly do this with TSQL - using the splitter Gianluca mentioned - but it's an expensive long-haul trip:
DECLARE @Message VARCHAR(8000)
SET @Message = 'Type=0 8=111 9=HSBC 35=d 49=DAC 56=ALA...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 7, 2011 at 3:03 am
If you're looking for a fixed percentage of random rows from each partition (salesperson), have you considered using NTILE?
SELECT
*
FROM (
SELECT *, NTILE(10) OVER(PARTITION BY Salesman ORDER BY NEWID()) AS...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 7, 2011 at 2:37 am
Ninja's_RGR'us (12/6/2011)
LutzM (12/6/2011)
Changing subject: Does anyone know one of the DBAinSpace finalists?There's no name I recognize as one of the Threadizens....
There's noone I recognize from this site, period. :crying:
Wasn't...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 10:07 am
drew.allen (12/6/2011)
ChrisM@Work (12/6/2011)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 8:18 am
drew.allen (12/6/2011)
ChrisM@Work (12/6/2011)
drew.allen (12/5/2011)
ChrisM@Work (12/5/2011)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 7:33 am
Cool, thanks for the feedback. I learned the trick from an article Lowell did years ago 😀 Thanks, Lowell.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 7:13 am
Plus 30 mins to round up:
SELECT CAST(DATEADD(hour,DATEDIFF(hour,0,DATEADD(minute,30,GETDATE())),0) AS TIME(0))
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 7:05 am
Duplicate post, work in progress here.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 5:13 am
Duplicate post, work in progress here.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 5:13 am
Perhaps usage is supposed to be like this:
DECLARE @streamid VARCHAR(5)
SET @streamid = '519'
SELECT @streamid
FROM (
SELECT streamgroupid = '%,519%' UNION ALL
SELECT '%,519,%' UNION ALL
SELECT '%519,%' UNION ALL
SELECT '%519%'
) d
WHERE @streamid...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 4:58 am
pallavi.unde (12/6/2011)
SELECT .....
where b.coursetypeid=@CourseId and b.degreeid=@DegreeId
and b.streamgroupid LIKE '''%,'+@streamid+',%'''
and b.streamgroupid LIKE +@streamid+',%'+''
and b.streamgroupid LIKE ''+'%,''%'+@streamid+''
and b.streamgroupid LIKE +@streamid+'%'
end
query is running...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 4:45 am
Put an index on your temp table. SQL Server will jump through fewer hoops creating the INSERT source.
CREATE --UNIQUE
CLUSTERED INDEX [CXscn] ON #glxRDCount (scn ASC)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 1:51 am
drew.allen (12/5/2011)
ChrisM@Work (12/5/2011)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 6, 2011 at 1:39 am
You might get one or two ideas from the following. It's proving very usable for data cleansing, which is similar to your scenario - you want to identify a case...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 5, 2011 at 10:30 am
No worries Martin.
Here's a wee hint - before you write a query, find out as much useful information as you can from the tables which will be referenced by it....
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 5, 2011 at 8:42 am
Viewing 15 posts - 6,406 through 6,420 (of 10,143 total)