Viewing 15 posts - 10,126 through 10,140 (of 10,143 total)
Hi Stewart
Peter Larsson recently posted an elegant solution to this problem, see
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=367397&p=4
Cheers
ChrisM
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
June 19, 2007 at 10:13 am
Hi EM
This wouldn't be a metal-plating company in Harlow, Essex by any chance? I had the exact same experience there about 7 years ago. It was infuriating! Management wouldn't listen...
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
June 15, 2007 at 5:52 am
Heh heh lovely job lads!
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
June 14, 2007 at 6:20 am
Hi Loner
You may be sliding down the slippery slope of Clinical Depression, a place where you really don't want to go. Make a few enquiries and find yourself a local...
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
June 12, 2007 at 4:48 am
And since there's only one SELECT from #temp...
select MetroCity as City, ...
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
June 12, 2007 at 4:04 am
Hi Dark Angel
<< I have a stored procedure (SP1) that returns multiple data sets.
i.e., the last 3 lines read:
SELECT * FROM...
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
June 5, 2007 at 8:13 am
Hi Bobs
Creating a separate table for city and province/state is probably over-normalization - you will still need a pointer (fk) in your customer table (and of course the pk in...
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
June 5, 2007 at 5:32 am
Found this on our dev server:
-- Author: Igor Nikiforov, Montreal, EMail: udfs@sympatico.ca -- PADL(), PADR(), PADC() User-Defined Functions -- Returns a string from an expression, padded with...
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
June 5, 2007 at 2:38 am
Hi Mike
Yes, you can use CASE (simple or searched) in a WHERE.
What are you comparing to [('A','E','I','O','U') else ('B','C','D','F')]?
Cheers
ChrisM
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
June 4, 2007 at 8:45 am
<proprietary UPDATE clause of SQL Server... magic... and blows cursor speed away>
This solution is really cute, and timely too - there are several current threads looking to a sequential...
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
June 4, 2007 at 8:31 am
Lovely! Nice way to end a friday.
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
June 4, 2007 at 3:42 am
No problem Ganesh -
--===== Create a test table and populate it with test data CREATE TABLE #MyHead (userid INT, logintime DATETIME) INSERT INTO #MyHead (userid, logintime)
SELECT 1234, '2007-05-10 17:18:00' UNION...
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
June 1, 2007 at 9:15 am
sql2day
Here's a stub query
SELECT * FROM TableName t WHERE DATEPART (hh, t.DateTimeColumn) = '23' AND DATEPART (mm, t.DateTimeColumn) = '59' AND DATEPART (ss, t.DateTimeColumn) = '59'
but as Jeff pointed out, if you want...
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
June 1, 2007 at 7:41 am
<<There is no way for to split the string I received to do what you write.>>
There's always a way...
DECLARE @STR AS VARCHAR(8000), @substr VARCHAR(500), @Statement CHAR(6), @EndPos INT
SET @STR =...
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
June 1, 2007 at 6:24 am
Hi Jeff
We're on SQL2k here. Can't wait to play with CTE on the next contract though.
Regarding matching on dates - good point. If an identity column is available, the same...
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
June 1, 2007 at 5:07 am
Viewing 15 posts - 10,126 through 10,140 (of 10,143 total)