Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: CDS View with custom fields

$
0
0

Hello,

 

there is an implicit type casting which is applied to the "dummy" columns. You just have to consider that you specify no dummy column values which do not match in general (e.g. specify a string although a decimal value is necessary). In your case it would be enough to define a dummy value 0 for the second table in case the field3 of the first table has a decimal value.

 

E.g.

DEFINE VIEW zcdsv_union_test AS
SELECT FROM table1 {
field1 AS part,
field2 AS site,
field3 AS qty
}
UNION
SELECT FROM table2
{
field1 AS part,
field2 AS site,
0 AS qty
}

 

Regards,

Florian


Viewing all articles
Browse latest Browse all 9165

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>