Hi All,
I have a query that refers to a value in a table that is stored as a float like this:
And the SSMA tells me that this view had po_account (INT), po_quantity (float).
I enquire in a different view:
(I simplified the problem for publishing purposes, of course there are more joins in the real life view, and because they are left outer I needed the COALESCE)
and it tells me that I have:
po_account (INT) -correct
vc_cash_current (DECIMAL (38, 5))
Has anyone got any idea why?
(Yes, I could change the float to decimal by casting, I just wanted to understand what's going on)
PS replacing the 'COALESCE' with ISNULL doesn't make much of a difference
I have a query that refers to a value in a table that is stored as a float like this:
Code:
VIEW [dbo].[v_cash_sub] AS SELECT po_account, SUM(po_quantity ) as cash FROM dbo.position INNER JOIN dbo.security ON se_id = po_security WHERE se_cash <> 0 GROUP BY po_account
I enquire in a different view:
Code:
CREATE VIEW [dbo].[v_cash_test] AS SELECT po_account as vc_account, COALESCE(cash, 0) as vc_cash_current FROM dbo.v_cash_sub
and it tells me that I have:
po_account (INT) -correct
vc_cash_current (DECIMAL (38, 5))
Has anyone got any idea why?
(Yes, I could change the float to decimal by casting, I just wanted to understand what's going on)
PS replacing the 'COALESCE' with ISNULL doesn't make much of a difference
Comment