Forum Replies Created

Viewing 15 posts - 886 through 900 (of 2,894 total)

  • RE: switching address with Subtring & len funtion

    PRINT 'Dwain.C COLLATE + CROSS APPLY'

    SET STATISTICS TIME ON

    SELECT @Email=RIGHT(

    STUFF(a.email

    ...

    SELECT email COLLATE Latin1_General_BIN2)...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    oops, double post...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    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 (

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Using Full-Text Search

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: CONTAINS Keyword.

    Could you please provide a little-bit more details? What is your query looks like now?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    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,...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    declare @email varchar(100) = 'Doe.John@CompanyABC.com'

    select SUBSTRING(@Email, CHARINDEX('.', @Email)+1,CHARINDEX('@', @Email)-CHARINDEX('.', @Email)-1)

    + '.'

    + SUBSTRING(@Email, 0, CHARINDEX('.', @Email))

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    However, I've realised it doesn't change the name places...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: locking question

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: switching address with Subtring & len funtion

    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 ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Using Full-Text Search

    ...

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Avoiding cursor: Help with getting only first match after previous match

    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...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 886 through 900 (of 2,894 total)