my senior tech prepared a view. viewing the source script, i have trouble understanding where the column label exists as neither tables contain that column. Is it a column that exists as part of a view – on the fly?
select label labelName
, e.name
, e.country
from entity e
source script:
SELECT e.entity_id
, se.screen_id
, s.country_code
,desc_trans translatedValue
, et.language_code
, cp.NAME name
FROM entity e
LEFT OUTER JOIN CONTROL_PREFIX cp
ON e.CONTROL_PREFIX_CODE = cp.CONTROL_PREFIX_CODE
, entity_trans et
, screen s
, screen_entity se
WHERE e.entity_id = et.entity_id
AND e.entity_id = se.entity_id
AND se.screen_id = s.screen_id
AND e.entity_type_code = 'LB'
UNION
SELECT e.entity_id
, se.screen_id
, s.country_code
, field_name labelName
, label labelText
, NULL translatedValue
, l.language_code
, cp.NAME name
FROM entity e
LEFT OUTER JOIN CONTROL_PREFIX cp
ON e.CONTROL_PREFIX_CODE = cp.CONTROL_PREFIX_CODE
, language l
, screen s
, screen_entity se
WHERE l.language_code NOT IN
(
SELECT et1.language_code
FROM entity e1
, entity_trans et1
WHERE e1.entity_id = et1.entity_id
AND e1.entity_id = e.entity_id
AND e1.entity_type_code = 'LB'
)
AND e.entity_type_code = 'LB'
AND s.screen_id = se.screen_id
AND e.entity_id = se.entity_id;
Assuming the SQL you posted is the SQL used to generate the view and is complete
i.e.
Column
Labelis on tableEntitybut appears in the viewmyViewasLabelName.If
entityis the name of the view, you’ll need to provide the source behind that view.