Viewing 15 posts - 76 through 90 (of 1,239 total)
select
LEFT(filename,LEN(filename)-CHARINDEX('\',REVERSE(filename)))
from master..sysaltfiles
That should do it.
March 13, 2020 at 8:59 am
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...
March 10, 2020 at 12:52 pm
From the post:
Not sure where this is useful or why it's there, but if anyone uses this, let us know.
If you yabingle "quirky update", you'll find examples of...
March 10, 2020 at 12:37 pm
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...
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 '_'.
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...
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...
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.
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.
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.
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...
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...
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...
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...
January 31, 2020 at 3:45 pm
Viewing 15 posts - 76 through 90 (of 1,239 total)