Viewing 15 posts - 886 through 900 (of 2,894 total)
PRINT 'Dwain.C COLLATE + CROSS APPLY'
SET STATISTICS TIME ON
SELECT @Email=RIGHT(
STUFF(a.email
...
SELECT email COLLATE Latin1_General_BIN2)...
November 21, 2012 at 3:13 am
oops, double post...
November 20, 2012 at 10:50 am
After a bit of testing, I can confirm that PARSENAME does win much more often over use of CHARINDEX with SUBSTRING's than other way around.
(Will keep this result in...
November 20, 2012 at 10:48 am
ScottPletcher (11/20/2012)
Eugene Elutin (11/20/2012)
ScottPletcher (11/20/2012)
select PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' + PARSENAME(left(email, charindex('@', email) - 1), 2) +
substring(email, charindex('@', email), len(email))
from (
...
November 20, 2012 at 10:05 am
DiverKas (11/20/2012)
SpringTownDBA (11/19/2012)
Full text querying only does prefix matching, not postfix'erin*' matches 'erinblah'
'*erin' doesn't match 'blaherin'
There is no way to match the last half of a word.
Actually, the way around...
November 20, 2012 at 9:48 am
ScottPletcher (11/20/2012)
select PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' + PARSENAME(left(email, charindex('@', email) - 1), 2) +
substring(email, charindex('@', email), len(email))
from (
select...
November 20, 2012 at 9:34 am
Could you please provide a little-bit more details? What is your query looks like now?
November 20, 2012 at 9:32 am
Another one from Lynn Pettis, for some reason he couldn't post it himself...
declare @email varchar(100) = 'Doe.John@CompanyABC.com'
SELECT
SUBSTRING(@email, 1, CHARINDEX('.', @email) - 1),
SUBSTRING(@email,...
November 20, 2012 at 9:29 am
declare @email varchar(100) = 'Doe.John@CompanyABC.com'
select SUBSTRING(@Email, CHARINDEX('.', @Email)+1,CHARINDEX('@', @Email)-CHARINDEX('.', @Email)-1)
+ '.'
+ SUBSTRING(@Email, 0, CHARINDEX('.', @Email))
...
November 20, 2012 at 8:52 am
However, I've realised it doesn't change the name places...
November 20, 2012 at 8:45 am
kd11 (11/20/2012)
the code you posted just give the lastname and company.com (doe@CompanyABC.com). I'm here Doe.John@CompanyABC.com And I want to get to John.Doe@CompanyABC.com
Not true. I've tested it:
declare @email varchar(100) = 'Doe.John@CompanyABC.com'
select...
November 20, 2012 at 8:43 am
Bhuvnesh (11/19/2012)
hi2u (11/19/2012)
Does the trigger keep the initial (TABLOCK, XLOCK) or the lock is released and another one is made for the trigger?Thanks
Yes to maintain the atomicity there will...
November 20, 2012 at 8:38 am
Whatever you have posted cannot be compiled!
Here what you can do:
select SUBSTRING(Email, -1, CHARINDEX('.', Email) +1) +
SUBSTRING(Email, CHARINDEX('.', Email), LEN(Email))
from ...
November 20, 2012 at 8:19 am
...
By the way, they do show "Panasonic" at the results, when searcing by "anasonic", while the user doesn't have to choose which kind of search he wants. And the query...
November 20, 2012 at 7:50 am
t.brown 89142 (11/20/2012)
CELKO (11/19/2012)
...
...
Common J.Celco rant
...
Thank you for your assessment ...
Now go back and hide under your bridge.
@t.browm
Here I may disappoint you, he must be rich enough to...
November 20, 2012 at 3:50 am
Viewing 15 posts - 886 through 900 (of 2,894 total)