Viewing 15 posts - 46 through 60 (of 276 total)
I really need to start using Stuff more - I have been one-upped twice in a week using stuff over substring. 😀
Thanks, I am going to really try and...
May 10, 2010 at 2:32 pm
I am sure there are other ways as well, but here is one way:
DECLARE @tbl TABLE(field1 VARCHAR(5), field2 VARCHAR(5), field3 VARCHAR(5))
INSERT INTO @tbl (field1, field2, field3) VALUES ('one', 'two', 'three')
INSERT...
May 10, 2010 at 2:14 pm
Oops, I missed that you wanted all the values of B.Col2 on one line. This does not get you that. Removed code. Sorry
May 10, 2010 at 12:45 pm
Please provide some insert ready test data and expected results for tested code.
May 10, 2010 at 9:09 am
[/quote]
Heh.... I understand the lesson in progress but I thought the requirements were actually pretty clear on this one. From the OP...
[/quote]
Yeah - when looking at just this post,...
May 8, 2010 at 9:11 pm
This is why we are looking for requirements.
May 7, 2010 at 1:44 pm
DECLARE @STR NVARCHAR(30)
SET @STR = '\\abc\xyz\wzy\123'
SELECT SUBSTRING(@str, 1, LEN(@str) - CHARINDEX('\', REVERSE(@str)))
I am posting my solution.
May 7, 2010 at 1:37 pm
Lynn Pettis (5/7/2010)
Do all the values in the column have at least four \'s?
Good question, a follow up question is do you just want to get rid of everything past...
May 7, 2010 at 1:35 pm
Care to post what you had? I have a solution, it may not be the best (Back to substring over stuff), but I am curious as to what you...
May 7, 2010 at 1:24 pm
neliii (5/7/2010)
\\abc\tri\eds\rf
\\fd\tri\ef\\ghij\tri\gf\rf\k
'
'
'
i got some rows like that in a...
May 7, 2010 at 1:19 pm
bteraberry (5/7/2010)
Of course ^ISNULL is better than doing a CASE.
Oh good, I was able to save face for that substring inefficient code. 😀
May 7, 2010 at 12:40 pm
Thanks! I have used stuff once or twice - you are correct - underused!
May 7, 2010 at 12:23 pm
My query will do that. you want col1 to be the same as col2.
May 7, 2010 at 11:36 am
Viewing 15 posts - 46 through 60 (of 276 total)