February 26, 2009 at 3:08 am
Hi,
How to find exact match of a value in a table
means User should be replaced by Employee
if text is like this " User has primary key UserID"
it should replace only User text and not the UserID text.
The replace function wil replace both..
so i need to find the exact match
With Regards
Dakshina Murthy
February 26, 2009 at 3:33 am
you can match on User plus the space
replace(columnname, "User ", Employee ")
or you can change the userid part of the string first, then revert afterwards
replace(replace(replace(columnname, "UserID", "UxSxExRxIxDx"), "User", "Employee"), "UxSxExRxIxDx", "UserID")
February 26, 2009 at 3:34 am
Use the spaces before and after the word 'User', like this:
REPLACE(mycolumn, ' User ', ' Employee ')
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 26, 2009 at 3:47 am
See also here.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 26, 2009 at 4:07 am
Samuel Vella (2/26/2009)
Chris Morris (2/26/2009)
See also here.Nice circular reference there Chris 😀
Whens your next TV show coming out?
Cheers! Looks a lot like homework hey?
Nah that's a different Chris Morris, there are loads of us. I don't have a sufficiently brass neck.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
February 26, 2009 at 4:15 am
Hi,
There is nothing like a home work or copied the same thing, i came across this and i have posted, may similarly the other guy might have also come across and might have done.
Any ways thanks for the help
With Regards
Dakshina Murthy
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply