Viewing 15 posts - 91 through 105 (of 1,251 total)
DECLARE
@String VARCHAR(100) = 'CKflower2002-pouch-5AR-OneSize'
select
SUBSTRING(@string,PATINDEX('%[0-9]%',@string),PATINDEX('%[^0-9a-z]%',@string)-PATINDEX('%[0-9]%',@string))
That will work for whatever the first delimiter is and for any length of string before the numbers. It does assume that...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
March 10, 2020 at 12:27 pm
select REPLACE(REPLACE(SUBSTRING('CKnovelty2002_pouch-5AR-OneSize',1,CHARINDEX('_','CKnovelty2002_pouch-5AR-OneSize',1) - 1),'CKnovelty',''),'CKflower','')Your CHARINDEX was looking for '-' rather than '_'.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
March 10, 2020 at 11:38 am
don't - I went once and it was "an experience" (this is from Wikipedia)
Kæstur hákarl, fermented Greenland shark.
Súrsaðir hrútspungar, the testicles of rams pressed in blocks, boiled...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
March 3, 2020 at 9:37 am
Glad to see everyone is talking about SQL Server stuff. Hope you've had a good last month.
The end of last month was fantastic because I had a week in...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
March 2, 2020 at 9:16 am
You need to run
EXEC sp_rename
and remove the ''GO'. That is a batch separator so your IF is technically in a different piece of code from your ELSE.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
February 18, 2020 at 10:19 am
If I remember rightly it's something to do with execution plans that use temp tables but don't take my word for that.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
February 17, 2020 at 2:28 pm
This post helped me in a similar situation. There might be a couple of other things you need to do but that was a good place to start.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
February 17, 2020 at 9:11 am
Sometimes a loop is the best way to do something. Doing something iteratively can be one of those times. Have you tested the performance of a loop? Do you know...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
February 13, 2020 at 1:14 pm
Stopped gigging a while back, now it is only for my personal pleasure (read: when no one else is at home)
Same here, it's one of the disadvantages to the 9-5...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
February 6, 2020 at 8:10 am
Jack's just kinda boring, that's all. It's not "bad", like undrinkable or anything, but it's not interesting either.
Some of the special Jacks are much better. I don't think they're...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 31, 2020 at 3:51 pm
OK, so I'm curious and interested in expanding my repertoire when it comes to liquor...
Whiskey / whisky vs scotch, and, what's so bad about Jack D?
(Note, I've only...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 31, 2020 at 3:45 pm
Tonight, I'll be having haggis. Pray for me.
Haggis is great though! Haven't had it in ages mind, but I've enjoyed it every time I have. In...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 31, 2020 at 10:20 am
haggis is great - it's the whiskey that makes it better
Careful with that 'e' there Mike. It's normally 'whisky' you have with haggis.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 31, 2020 at 9:13 am
I'm planning on doing another belly this summer when I do 2 pork shoulders and 6 chickens for my daughter's grad party. She's undecided on the smoked macaroni and cheese. ...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 31, 2020 at 8:49 am
Maybe I should post more :-/ Just never seem to have an answer or a better solution 🙁
The one time I met Grant in person, we chatted about...
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
January 30, 2020 at 10:47 am
Viewing 15 posts - 91 through 105 (of 1,251 total)