• mar.ko (9/4/2015)


    INSERT WITH SELECT HAS THIS:

    ,Convert(Int,TARG_SALES) AS TARG_SALES

    Treats the column as if it were formatted decimal !!

    Please supply the following information:

    CREATE TABLE statement for the table being inserted into.

    CREATE TABLE statement for the table being selected from.

    INSERT statements for the table being selected from that will demonstrate this issue.

    The exact INSERT statement that you are running that has this issue.

    For the data in the INSERT statements that you provided above, what are the results of the INSERT statement? (SELECT results from the table being inserted into)

    (Please see the first link in my signature for how to get / post data in order to get better answers, faster.)

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2