I have a View that multiplies a decimal (8,5) data type * money data type (no cast or convert) and for some odd reason comes up with a bit result (0 or 1). If I take the select statement out of the View, paste it into Query analyzer and execute it I get a decimal result.
It's easy enough to put a cast into the view but I'm wondering what is going on in the view that returns the bit data type.
set nocount on
create table test1
(col1 decimal (8, 5),
insert into test1 values (30.2, .6)
insert into test1 values (20.0, 1.5)
create view test11
select col1 * col2 as prod, col1, col2
drop view test11
drop table test1