Viewing 15 posts - 721 through 735 (of 5,356 total)
You certainly don't need to loop through the string to search for some pattern. Just use CHARINDEX or PATINDEX. They return a value > 0 when a match is found....
March 29, 2005 at 1:35 am
March 29, 2005 at 1:11 am
March 29, 2005 at 1:09 am
This will be another neverending story, I think.
It's fairly easy at the moment to write bad code for SQL Server. It will get even easier with CLR integration. I...
March 29, 2005 at 1:04 am
Farrell, nobody else but you can answer this question.
But I wanted to say something that hasn't been addressed yet. The new job perspective...
March 29, 2005 at 12:53 am
Doh, I've missed this "sometimes" and had thought that there is never a comma. Thanks for catching that!
March 29, 2005 at 12:28 am
I like to think that this is for data cleansing to get rid of 1NF violation
I'm going home now.
Happy Easter to you all!
March 24, 2005 at 8:30 am
If you can ensure the string *always* contains 'USA', this might work
declare @string varchar(20)
set @string = 'Chicago, IL USA'
select replace(rtrim(ltrim(@string)), ' USA',', USA')
-----------------------
Chicago, IL, USA
(1 row(s) affected)
March 24, 2005 at 8:26 am
Haha, for qualifying this as a shameless plug, you forgot to post the URL.
March 24, 2005 at 7:54 am
... and if that still isn't enough, and you know in advance that you need to keep a row for almost every single grain of sand in the Sahara, you can do...
March 24, 2005 at 7:43 am
Since each sample should be taken randomly, I assume, I think you must bite the bullet and write 4 queries SELECT ... BY NEWID(). Sorry, I don't know any other...
March 24, 2005 at 7:14 am
Does it need to be a UDF at all?
March 24, 2005 at 6:46 am
I did the google thing yesturday (forget my exact clause but it was similar) and I was just returning garbage as far as usefull sites.
Yes, it seems to be an...
March 24, 2005 at 6:17 am
TANSTAAFL.
Short answer, no. But please read the article I referenced
March 24, 2005 at 6:15 am
March 24, 2005 at 5:34 am
Viewing 15 posts - 721 through 735 (of 5,356 total)