September 15, 2008 at 2:08 pm
I have the following script:
SELECT c.Customer_Id,
c.Created_Date,
c.Cust_last_Name,
c.Cust_first_name,
i.gross_income,
i.other_income,
i.primary_income
FROM Customer c WITH (NoLock)
INNER JOIN Customer_Income i WITH (NOLOCK) ON c.customer_id = i.customer_id
WHERE created_Date >= '07/15/2008'
AND Created_Date <= '09/15/2008'
And i.gross_income >=.01
and (i.gross_income - cast(i.gross_income as int)) > 0.01
and when I run it I get the following error:
[Microsoft][ODBC SQL Server Driver][SQL Server]There is insufficient result space to convert a money value to int.(22003,237)
has anybody seen this before?
Warm Regards,
Arthur Lorenzini
Sioux Falls, SD
September 15, 2008 at 4:08 pm
Arthur.Lorenzini
I have duplicated what I can deduce as your Customer and Customer_Income tables, using both SmallMoney and Money as the data type for your gross_income column. I have not been able to duplicate your error, in fact I have not been able to create an error, your script works "A OK". So I am in a puzzle as to how to offer some assistance no matter how slight. Can you expand some what so that some one can help?
September 15, 2008 at 4:12 pm
Thinks for the reply but I solved the issue by using ROUND() instead of CAST.
Warm Regards,
Arthur Lorenzini
Sioux Falls, SD
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply