Viewing 15 posts - 43,291 through 43,305 (of 59,063 total)
Heh... like everything else, "It Depends". 😛 I'll do it 3 different ways depending on the situation and the database... use the Wizard to setup a plan, use the...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 10:05 pm
ktlady (6/20/2009)
Jeff, thanks for the pointer. Sorry that I missed it the first time. It sure is a great article! There is so much to learn for SQL server!
It's ok......
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 9:53 pm
As a side bar, for those interested in a Tally table solution that will work in virtually any release of SQL Server...
[font="Courier New"]--===== Build the test table as the data source
CREATE TABLE dbo.TableA (Column1 VARCHAR(5), Column2 VARCHAR(30))
INSERT INTO dbo.TableA
(Column1, Column2)
SELECT 'a1', '1:3:5:6' UNION ALL
SELECT 'a2', '2:4:5'
--===== Solution for virtually any version of SQL Server
INSERT INTO dbo.TableB
(Column1, Column2)
SELECT a.Column1,
SUBSTRING(a.Column2, t.N+1, CHARINDEX(':', a.Column2, N+1) - N-1) AS Column2
FROM dbo.Tally t
CROSS JOIN
(SELECT Column1, ':'+Column2+':' AS Column2 FROM dbo.TableA) a
WHERE N < LEN(a.Column2)
AND SUBSTRING(a.Column2, N, 1) = ':'
[/font]
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 9:41 pm
Florian Reischl (6/20/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 9:18 pm
Nice article and great explanation in the article... too bad they didn't actually test it for performance... 😉 Both of the following UDF's render identical execution plans and they...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 9:12 pm
balars_2000 (6/14/2009)
Thanks Jeff. Really appreciate your help mate.
Sorry for the late feedback on my part. Thank you for your's, Balars... it's the only "payment" we get for doing stuff...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 7:20 pm
Sorry for the delay. I agree that if you have any leading spaces, you'll need to do one of two things... so far as I'm concerned, the best thing...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 6:47 pm
Steve Jones - Editor (6/15/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 6:29 pm
jcrawf02 (6/18/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 6:25 pm
Joseph Henry (5/14/2009)
First and foremost, thank you very much for the help you have been providing me. It is helping me to both learn more and have a stronger...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 6:17 pm
Paul White (6/19/2009)
Jeff Moden (6/19/2009)
Heh... cool... maybe a little head boiling will get him to fix the code windows for IE? 😛I admire your persistence.
And your optimism!
😛
... and neither...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 6:02 pm
WayneS (6/20/2009)
Jeff Moden (6/17/2009)
Ummmm.... my rule of thumb is to peel one potato at a time on the quirky update...
Hey Jeff, I remember reading a post where you loaded...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 5:59 pm
ps (6/20/2009)
Paul White (6/20/2009)
Lynn Pettis (6/20/2009)
If we just give him answers and he ends up in a position that he isn't qualified for do, who's fault is it, ours or...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 5:39 pm
mpacifico (6/19/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 20, 2009 at 3:55 pm
george sibbald (6/19/2009)
tosscrosby (6/19/2009)
sarvesh singh (6/18/2009)
our teste serverI don't even want to know! 😉
we always have a failover pair for those type of servers. 😉
I'll bet that can get...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 19, 2009 at 2:01 pm
Viewing 15 posts - 43,291 through 43,305 (of 59,063 total)