Forum Replies Created

Viewing 15 posts - 871 through 885 (of 2,894 total)

  • RE: switching address with Subtring & len funtion

    ...

    I should also say, that while I commend you on your ability to quickly build working CLRs, in my opinion if you've got a reasonably close pure SQL solution it's...

    _____________________________________________
    "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

    dwain.c (11/21/2012)


    Jeff Moden (11/21/2012)


    I don't believe that COLLATE will help a STUFF (but I haven't tested it). Logically speaking, it should only help when string comparisons are being made.

    I...

    _____________________________________________
    "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

    dwain.c (11/21/2012)


    ...

    Both of the original solutions (yours and Scott's) are subject to the same error! So both must introduce the overhead of the check in the event you want...

    _____________________________________________
    "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

    Mark-101232 (11/21/2012)


    ...

    Another tweak helps a bit (maybe... assuming I've got this right)

    Change

    ,1, '.' + LEFT(a.email, CHARINDEX('.', a.email)-1) + '@')

    to

    ,0, '.' + LEFT(a.email, CHARINDEX('.', a.email)-1))

    Nope, it doesn't do much for...

    _____________________________________________
    "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: interview questions

    Alvin Ramard (4/17/2009)


    Nicholas Cain (4/17/2009)


    Here's my personal favourite to spring:

    It's 3pm on a Friday, your production OLTP environment is down, every hour down costs the company one million dollars. People...

    _____________________________________________
    "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: Stored Proc - Nullable Parameters for optional filtering - handling LinkTable LEFT JOINs

    Steven Willis (11/20/2012)


    I think this may do what you are trying to do. If the search term is in both tables then the matching row only from Table A displays,...

    _____________________________________________
    "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: how can i write 2 select statements in single procedure

    How do you execute you stored procedure?

    Is it from SSMS or your client application or something else?

    _____________________________________________
    "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: CHARINDEX and SUBSTRING

    kalyav21 (11/21/2012)


    Thank you, It works fine for whatever the sample I have given.

    But, I also have a sample like this

    { ActionOption : [ Selection Error ] },{ SubstatusName : [...

    _____________________________________________
    "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

    Here we go!

    First of all, I would like to mention that SET STATISTICS TIME ON and OFF, is not the best for measuring time execution (J.Moden pointed it sometimes ago...

    _____________________________________________
    "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: CHARINDEX and SUBSTRING

    select LTRIM(RTRIM(

    REPLACE(

    REPLACE('{ ActionOption : [ Past Audit Window ] }','{ ActionOption : [','')

    ...

    _____________________________________________
    "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: how can i write 2 select statements in single procedure

    CREATE PROC dbo.usp_TwoSelects

    AS

    BEGIN

    SELECT * FROM dbo.Table1

    SELECT * FROM dbo.Table2

    END

    _____________________________________________
    "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: Update statement question

    Both statements will perform exactly the same update, with most likely exactly the the same performance.

    However, it's considered to be a good practice to drive your query from the smallest...

    _____________________________________________
    "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: Format date time

    ...

    ...CONVERT(VARCHAR(25), GETDATE(), 22)

    ...

    ...

    Looks like MS forgot to document this style :w00t:...

    _____________________________________________
    "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: Format date time

    ...

    Is there a simpler way than

    DECLARE @dDate DATETIME = GETDATE()

    SELECT CONVERT(VARCHAR, @dDate, 103) + ' ' + LTRIM(STUFF(SUBSTRING(CONVERT(VARCHAR, @dDate, 109), 13, 14), 9, 4, ' '))

    Thanks!

    P

    There is in SQL2012...

    Before that,...

    _____________________________________________
    "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: Optimization of stored procedures

    Nikhi123 (11/20/2012)


    Hi,

    I have a number of stored procedures used for reporting and whenever we run these reports it slows down the entire database.

    Will optimizing the stored procedures improve the performance...

    _____________________________________________
    "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 - 871 through 885 (of 2,894 total)