September 4, 2015 at 4:23 pm
INSERT WITH SELECT HAS THIS:
,Convert(Int,TARG_SALES) AS TARG_SALES
Treats the column as if it were formatted decimal !!
September 4, 2015 at 8:57 pm
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
September 5, 2015 at 8:25 am
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 !!
Looks more like a rounding trick in the insert, pretty certain the column's datatype is of a decimal type.
😎
September 7, 2015 at 9:16 am
My bad....the column was formatted as decimal (who did that ??!!**&&)
September 7, 2015 at 11:31 am
mar.ko (9/7/2015)
My bad....the column was formatted as decimal (who did that ??!!**&&)
If you don't know this, then you have people with improper access to your database.
Gotta love how requesting the table DDL fixes the problem though... 🙂
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply