|
I am running into this error when I try to load the hist.prc from the inner join at the bottom of the script. What is it about the rownumber partition that makes it a string and is there a way to cast it as money?
(comments are locked)
|
|
This problem has nothing to do with the row numbering. If hist.prc is money then the string or binary data woudl be truncated is simply caused the fact that the corresponding column in your temp table is not money, but is something else instead. Money is mapping directly to decimal(19, 4), and therefore, if your temp table's column is decimal of a smaller precision and/or scale then this error will inevitably occur. You should either try to get by by turning the ansi_warnings off or better still by making sure that the column in question of your temp table is not defined as int which is essentially a decimal(10, 0) or a decimal of a smaller than money precision and/or scale. Oleg
(comments are locked)
|
|
Does this query execute successfully with the ROW_NUMBER() returns an INT. What do you mean by when you `load' the hist.prc? you can use I am trying to load this intire scrript into a temp table for use in a sproc. the prc is declared as money and failiing when I try to load it. I have commented out all of the fields and the magic error seems to be occurring on this hist.prc field
Feb 16 '11 at 12:53 PM
siera_gld
If I run the query as a straight query it runs fine - but I've got more data to load (sales from another table) so I want to do it in stages
Feb 16 '11 at 12:59 PM
siera_gld
(comments are locked)
|

