Viewing 15 posts - 2,251 through 2,265 (of 3,543 total)
![]() | It would be nice if the posters acknowledged that the solution worked.... |
Couldn't agree more
July 11, 2005 at 7:58 am
![]() | ....if VARCHAR then you WONT |
Not entirely true.
varchar columns may or may not have trailing spaces, they...
July 11, 2005 at 7:51 am
![]() | Well I'd vote for myself so I get at least one vote |
That goes without saying
July 11, 2005 at 7:34 am
![]() | That might start a little war... not sure it's a good idea. |
Is that because you might...
July 11, 2005 at 7:24 am
np, sets a challenge to rethink the solution, always a good idea
July 7, 2005 at 8:01 am
Remi is right in that the queries are not the same
CONTAINS(ArticleDescription, 'magazine')
is the same as
LIKE '% magazine %' (yes there is a space either side of the word...
July 7, 2005 at 7:53 am
Any string manipulation is slow and it is all relative to the size of the dataset
therefore another alternative
SET @RefDes = ''
select @RefDes...
July 7, 2005 at 7:40 am
SELECT *
FROM Products WHERE ProductID IN (31, 5, 7, 9, 12)
ORDER BY CHARINDEX(', '+CAST(ProductID as varchar)+',',','+'31, 5, 7, 9, 12'+',')
or if using variable/parameter
DECLARE @ID varchar(100)
SET @ID...
July 7, 2005 at 7:29 am
SET @RefDes = ''
select @RefDes = @RefDes +
CASE WHEN CHARINDEX(','+ref_des+', ',','+@RefDes)>0 THEN '' ELSE ref_des + ', ' END
from A
right outer JOIN
B ON A.job...
July 7, 2005 at 7:16 am
WHEN PATINDEX('[0-9][0-9][0-9][0-9][.]',CardExpDate) > 0 THEN STUFF(LEFT(CardExpDate,4),3,0,'20')
p.s. you can do the RTRIM as well if you wish
July 6, 2005 at 9:25 am
![]() | The column should be rtrimed automatically if you have a [n]varchar column |
July 6, 2005 at 9:20 am
Works OK for me, what result do you get (or do you get an error?)
July 6, 2005 at 8:50 am
July 6, 2005 at 7:19 am
Viewing 15 posts - 2,251 through 2,265 (of 3,543 total)