June 14, 2011 at 4:21 am
when trying to execute the following;
,[Category] =
CASE
When Cast((
Case
When JobInvoiceCostQuery.InvoiceCost >0 then JobInvoiceCostQuery.InvoiceCost
When JobCausations.Description ='Contract' then (Case When Jobs.ReferredCost>0 then Jobs.ReferredCost Else 0 End)
When Jobs.EstimatedCost = 200 then (Case When Jobs.ReferredCost is null then Assets.AccuralValue Else Jobs.ReferredCost End)
When Jobs.EstimatedCost = 0 then (Case When Jobs.ReferredCost is null then 0 Else Jobs.ReferredCost End)
When Jobs.ReferredCost is not null then Jobs.ReferredCost
Else Jobs.EstimatedCost
End) AS money) >= @limit Then 'Over' & @limit
Else 'Under' & @limit
END
I get a Microsoft SQL Server, Error: 245 message which is a conversion failure when converting the varchar value under to data type int.
Does anybody know what this means?
Thanks
Carl.
June 14, 2011 at 5:37 am
it means you have values in your varchar fields that either are not numeric and cannot be cast to a int or they are a value that falls outside of the int range.
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
June 14, 2011 at 5:38 am
This was removed by the editor as SPAM
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply