March 20, 2008 at 9:42 am
Matt: Great tip! I used it on my earlier post and it worked. Thanks.
March 20, 2008 at 10:44 am
That's what I basically did (after about 10 edit attempts). I italicized everything after the ampersand. It appears that when the parser for this editor sees an ampersand it wipes out all alphabetic characters up to the semicolon. So the trick of using > for instance, wipes out the gt; but converts the & to an ampersand. Seems like it might be a bug in the editor control. Apparently when it encounters a nonalphabetic character like [ it acts as a break between the ampersand and the alphabetic characters.
March 20, 2008 at 10:50 am
Thanks for the additional reply. I wish there was an easy escape character or set of characters to say "hey, please print this text as-shown". Sort of like doubling a single quote in a string to let SQL Server know that it really is just a single quote.
August 21, 2008 at 9:29 am
Jeff
Its brilliant. But how on earth can anyone be expected to figure out the STUFF(... WHERE ... FOR XML PATH('') Syntax - especially when there is no XML involved!
I'll be using this, but I'm a bit wary as I don't know exactly how it works
August 23, 2008 at 10:51 am
Tom Brown (8/21/2008)
JeffIts brilliant. But how on earth can anyone be expected to figure out the STUFF(... WHERE ... FOR XML PATH('') Syntax - especially when there is no XML involved!
I'll be using this, but I'm a bit wary as I don't know exactly how it works
Thanks... I wish I could take credit for it, but I can't.
I haven't done an indepth analysis of the method, but I've read that it tries to make an XML path out of the individual items and, because the "root" is supressed, it generates not tags. The "STUFF" is just to kill the leading comma.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 12, 2013 at 3:06 pm
Jeff,
Thanks for the article. I was considering going down the function path when I thought there was a better way. Glad I looked. In my case I am using the 'csv' to provide intelligence data to one of our departments.
John
February 10, 2022 at 1:58 pm
Then as now. The answer to major performance problems is reduced data sets.
I recently had to recommend this for a Humana open enrollment period. Over a billion records, and an estimated runtime of 21 days.
Broke it up into 100,000 records at a time, and it took 36 hours.
February 10, 2022 at 2:00 pm
Back in the 80's a friend of mine told me that programmers were taught to code like the processor had infinite clock cycles, and infinite memory. Programing time was expensive, processing time was cheap. I am sure that is still being taught that way.
I came from an electronics background, where everything was about the limits.
Viewing 8 posts - 76 through 82 (of 82 total)
You must be logged in to reply to this topic. Login to reply