Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss Content Posted by Jeff Moden
»
Tally OH! An Improved SQL 8K “CSV Splitter”...
549 posts, Page 1 of 55
1
2
3
4
5
»
»»
Tally OH! An Improved SQL 8K “CSV Splitter” Function
Rate Topic
Display Mode
Topic Options
Author
Message
Jeff Moden
Jeff Moden
Posted Sunday, May 01, 2011 9:02 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:32 PM
Points: 32,906,
Visits: 26,792
Comments posted to this topic are about the item
Tally OH! An Improved SQL 8K “CSV Splitter” Function
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1101315
WayneS
WayneS
Posted Sunday, May 01, 2011 2:04 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 4:35 PM
Points: 6,369,
Visits: 8,232
Jeff, I had to rate this article 5 stars, because that's as high as the ratings allow. It deserves a 15!
BTW, I'm aghast --- you've actually
used
a SQL CLR now!
It would be nice if we could get Paul to contribute it, and to have it added to the resources of this article.
Again, excellent job. Extremely well done, and extremely thorough. Thank you so much for this article, and for the new DelimitedSplit8K function.
Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then
DON'T USE IT
on a production system! After all,
you
will be the one supporting it!
Links:
For better assistance in answering your questions
,
How to ask a question
,
Performance Problems
,
Common date/time routines
,
CROSS-TABS and PIVOT tables Part 1
&
Part 2
,
Using APPLY Part 1
&
Part 2
,
Splitting Delimited Strings
Post #1101374
Evil Kraig F
Evil Kraig F
Posted Sunday, May 01, 2011 3:08 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:44 PM
Points: 5,677,
Visits: 6,124
Thanks Jeff. It's great to walk with you through your beer-popsicle thought process, and for all the work you did here.
I thought I was the only one who would sit in the corner with the dust bunnies....
I still want to shoot CLR though.
- Craig Farrell
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions
|
Forum Netiquette
For index/tuning help, follow these directions.
|
Tally Tables
Twitter: @AnyWayDBA
Post #1101385
Jeff Moden
Jeff Moden
Posted Sunday, May 01, 2011 3:16 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:32 PM
Points: 32,906,
Visits: 26,792
WayneS (5/1/2011)
Jeff, I had to rate this article 5 stars, because that's as high as the ratings allow. It deserves a 15!
BTW, I'm aghast --- you've actually
used
a SQL CLR now!
It would be nice if we could get Paul to contribute it, and to have it added to the resources of this article.
Again, excellent job. Extremely well done, and extremely thorough. Thank you so much for this article, and for the new DelimitedSplit8K function.
I couldn't have done it without the help of you, Ron, and Paul. All 3 of you did some awesome work with testing and verification of the code. You guys ROCK!
So far as the CLR goes... yeah, I know I stuck my toe into the other world, but I had to know if the new function even came close. Paul was very cool in his understanding that I don't even know how to spell "C" and he made it real easy for me to install.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1101389
Jeff Moden
Jeff Moden
Posted Sunday, May 01, 2011 3:19 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:32 PM
Points: 32,906,
Visits: 26,792
Craig Farrell (5/1/2011)
Thanks Jeff. It's great to walk with you through your beer-popsicle thought process, and for all the work you did here.
I thought I was the only one who would sit in the corner with the dust bunnies....
I still want to shoot CLR though.
Heh... dust bunnies know so much!
Thanks for the feedback, Craig.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1101392
bitbucket-25253
bitbucket-25253
Posted Sunday, May 01, 2011 4:01 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 4:00 PM
Points: 5,102,
Visits: 20,205
WayneS (5/1/2011)
Jeff, I had to rate this article 5 stars, because that's as high as the ratings allow. It deserves a 15!
BTW, I'm aghast --- you've actually
used
a SQL CLR now!
It would be nice if we could get Paul to contribute it, and to have it added to the resources of this article.
Again, excellent job. Extremely well done, and extremely thorough. Thank you so much for this article, and for the new DelimitedSplit8K function.
Jeff let me second WayneS statement.... and add it was an honor and privilege to work for you on the testing.
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1101401
Jeff Moden
Jeff Moden
Posted Sunday, May 01, 2011 4:50 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:32 PM
Points: 32,906,
Visits: 26,792
bitbucket-25253 (5/1/2011)
WayneS (5/1/2011)
Jeff, I had to rate this article 5 stars, because that's as high as the ratings allow. It deserves a 15!
BTW, I'm aghast --- you've actually
used
a SQL CLR now!
It would be nice if we could get Paul to contribute it, and to have it added to the resources of this article.
Again, excellent job. Extremely well done, and extremely thorough. Thank you so much for this article, and for the new DelimitedSplit8K function.
Jeff let me second WayneS statement.... and add it was an honor and privilege to work for you on the testing.
Thanks for all the help testing, Ron. You did a great job. Heh... and no dust bunnies where actually injured during any of the tests.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1101407
Solomon Rutzky
Solomon Rutzky
Posted Sunday, May 01, 2011 9:19 PM
SSC Veteran
Group: General Forum Members
Last Login: Today @ 9:37 AM
Points: 285,
Visits: 1,378
Very thorough analysis. Great job!
Take care,
Solomon...
SQL# -
http://www.SQLsharp.com/
Post #1101423
Abrar Ahmad_
Abrar Ahmad_
Posted Monday, May 02, 2011 2:56 AM
SSC Veteran
Group: General Forum Members
Last Login: Saturday, May 18, 2013 5:49 AM
Points: 202,
Visits: 1,043
Solomon Rutzky (5/1/2011)
Very thorough analysis. Great job!
Take care,
Solomon...
But it seems at least a week long activity !!!
Goodish!
Post #1101466
David Data
David Data
Posted Monday, May 02, 2011 3:05 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 3:28 AM
Points: 115,
Visits: 719
All these methods use CHARINDEX to efficiently see where the next delimiter is. But what about handling CSV strings with quoted text, e.g. where "John Smith","23, The High Street","Sometown" has to be split into 3 strings? Do you have a good method for this sort of data?
(This is why I prefer tab separated to comma separated, with all its different ways to handle embedded comas, but usually you have to process the client's data as they give it to you, not as you'd like it
)
Post #1101471
« Prev Topic
|
Next Topic »
549 posts, Page 1 of 55
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.