You can translate the question and the replies:

Add Column Description doesn't work with UNION when appending record

I am trying to append a specific record to a derived view with UNION. The view can be created without DESCRIPTION. But when I do CREATE OR REPLACE VIEW xxx DESCRIPTION = ‘xxx’ (columnname (DESCRIPTION = ‘xxx’)), it will give me an error saying the firld properties can only e specified for derived fields. But if I remove the column descriptions part with only CREATE OR REPLACE VIEW xxx DESCRIPTION = ‘xxx’, it will create the view. CREATE OR REPLACE VIEW xxx DESCRIPTION = ‘{…..}’ (column_name (DESCRIPTION = ‘’…’) ) AS (SELECT ‘1’, ‘2’, ‘3’ FROM DUAL()) UNION (SELECT id, name FROM a INNER JOIN b ON = WHERE …..)
27-05-2022 19:33:54 -0400

1 Answer

Hello, I can reproduce the same error message myself when writing a similar query. My understanding is that you are **missing a projection** on top of the query. You can easily sort this by adding an extra select statement. As an example, have a look at this VQL: ``` CREATE OR REPLACE VIEW iv_customer_address DESCRIPTION = '...' (text1 (DESCRIPTION = '…')) AS SELECT '1' as text1, '2' as text2, '3' as text3 FROM (SELECT '1' as text1, '2' as text2, '3' as text3 FROM dual() UNION (SELECT '1', '2', '3' FROM address a INNER JOIN customer b ON a.address_id = b.address_id)) ``` There is **one recommendation**: Denodo Platform doesn’t let you edit the query if you write it using two statements at once, as it does not know how to put it graphically. Therefore, to avoid these errors, you should perform these statements separately and union these graphically as the Denodo Platform easily allows you to. Hope this helps!
Denodo Team
31-05-2022 05:01:43 -0400
You must sign in to add an answer. If you do not have an account, you can register here