Forum Replies Created

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

  • RE: Remove the first character of a string

    In that case, either an IIF statement or REGEX should help. (Google regex or IIF in ssis for details.)

    You'd basically use a script component after your data import to remove...

  • RE: How to Combine redundant values into one field using stored procedure!

    You might want to search this site for "string concatenate for xml path".

    I'm sure FOR XML PATH will do the trick.

  • 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

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

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

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

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

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

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

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

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

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

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

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

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

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