Forum Replies Created

Viewing 15 posts - 2,491 through 2,505 (of 5,502 total)

  • RE: Remove the first character of a string

    Something like this?

    SELECT CASE WHEN LEFT(YourCol,1) ='|' THEN STUFF(YourCol,1,1,'') ELSE YourCol END



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Sql Performance issue

    I had a look at the Execution plan you posted.

    It looks pretty straight forward.

    If 50% of the time it takes is sorting 2 (two) rows in a table variable I...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Burned Out?

    tosscrosby (12/2/2010)


    Junglee_George (12/2/2010)


    Hi

    Have a cup of tea & relax for 10 minutes..It works..!!

    Pffftttt.....You must not be in the IT arena. Seems more like HR or accounting.....more like HR...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Counting and filtering by year

    You could try

    SUM(CASE WHEN [Year Purchased]>YEAR(DateAdd(Year, - 1, GetDate()))

    THEN 1 ELSE 0 END) AS [1yr PO Line Items]

    It might be a good idea...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Constraint based on the value of a different field

    You can simply expand your current CHECK constraint:

    CHECK ((actionId IN(1,2) and associatedId is null) OR (actionId =3 and associatedId is not null))

    As a side note: You should always use a...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Skip on error SQL statements

    If possible for you could you please post the basic concept of your sproc?

    Reason: Having a single sproc with a 1000 update statements calls for a review. Either the sproc...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need ideas for a process

    ALZDBA (11/30/2010)


    You're getting the arithmatic overflow, because checksum generates:

    declare @a int, @b-2 int, @c int

    select @a=checksum(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16)

    , @b-2=checksum(10,2,3,4,5,6,7,8,9,1,11,12,13,14,15,16)

    ,@c=checksum(14,2,3,4,5,6,7,8,9,10,11,12,13,1,15,16)

    -- Which one is closer to @a? @b-2 or @c?

    -- I'm...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Case Statement Error

    looks like a missing comma before the CASE statement.

    I'd also recommend to add an alias to your CASE .. END. 😉



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need ideas for a process

    ALZDBA (11/30/2010)


    did you experiment with CheckSum computed columns to detect perfect matches quickly ?

    , RwCheckSum as checksum(col1, col2, col3, col4, col5, col6, col7, col8, col9, col10,...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need ideas for a process

    Would it be possible to add a persisted computed column to each table based on col1*2^(1/8) + col2*2^(1/7)+...col16*2^7 or any other calculation that'd take the ordinal position into account and...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: CSV Import Problem

    and here's the set based solution (I knew there would be at least one...)

    CREATE TABLE #tempWeirdExcelList

    ( id INT IDENTITY(1,1),

    list VARCHAR(50)

    )

    INSERT INTO #tempWeirdExcelList(list)

    SELECT ' 1400.00,"" ...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: CSV Import Problem

    Here's a *cough* loop version I just tried to solve that little puzzle. I'm more than confident there are much better solutions available...

    Edit: a recursive CTE would be possible, too....



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Export XML file into a table

    In general, both options you described can be used.

    However, the xml sample you provided cannot be shredded into separate columns.

    The reason is the multiple declaration of the default namespace. (xmlns="http://guidewire.com/typelists"...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Setting up Database mail using gmail account

    Jeff Moden (11/28/2010)


    sayfrend (4/7/2009)


    Try disabling your windows fire wall

    Don't do it for love nor money. 😉

    After more than 18 month the advice is still true... I'm not sure if...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Date format not working

    Something like this?

    SELECT sitPosition

    FROM mfSitPosition

    WHERE sitDateTime >DATEADD(MI,-30,GETDATE())



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 2,491 through 2,505 (of 5,502 total)