Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (
- select
- `opex_budget`.`id` as `opex_budget___id`,
- `opex_budget`.`opex_id` as `opex_budget___opex_id`,
- `opex_budget`.`currency_code` as `opex_budget___currency_code`,
- `opex_budget`.`forecast` as `opex_budget___forecast`,
- `opex_budget`.`value` as `opex_budget___value`,
- `opex_budget`.`comment` as `opex_budget___comment`,
- NULL AS `parent_cost_centre___id`,
- NULL AS `parent_cost_centre___target_id`,
- NULL AS `parent_cost_centre___target_type`,
- NULL AS `parent_cost_centre___target_bundle`,
- NULL AS `total_budget_value___id`,
- NULL AS `year___id`,
- NULL AS `year___target_id`,
- NULL AS `year___target_type`,
- NULL AS `year___target_bundle`
- from
- `field_opex_cost_summary__opex_budget` as `opex_budget`
- where
- (
- `entity_id` = 111
- and `entity_type` = 'budget'
- and `entity_bundle` = 'record'
- )
- )
- union
- (
- select
- NULL AS `opex_budget___id`,
- NULL AS `opex_budget___opex_id`,
- NULL AS `opex_budget___currency_code`,
- NULL AS `opex_budget___forecast`,
- NULL AS `opex_budget___value`,
- NULL AS `opex_budget___comment`,
- `parent_cost_centre`.`id` as `parent_cost_centre___id`,
- `parent_cost_centre`.`target_id` as `parent_cost_centre___target_id`,
- `parent_cost_centre`.`target_type` as `parent_cost_centre___target_type`,
- `parent_cost_centre`.`target_bundle` as `parent_cost_centre___target_bundle`,
- NULL AS `total_budget_value___id`,
- NULL AS `year___id`,
- NULL AS `year___target_id`,
- NULL AS `year___target_type`,
- NULL AS `year___target_bundle`
- from
- `field_relationship__parent_cost_centre` as `parent_cost_centre`
- where
- (
- `entity_id` = 111
- and `entity_type` = 'budget'
- and `entity_bundle` = 'record'
- )
- )
- union
- (
- select
- NULL AS `opex_budget___id`,
- NULL AS `opex_budget___opex_id`,
- NULL AS `opex_budget___currency_code`,
- NULL AS `opex_budget___forecast`,
- NULL AS `opex_budget___value`,
- NULL AS `opex_budget___comment`,
- NULL AS `parent_cost_centre___id`,
- NULL AS `parent_cost_centre___target_id`,
- NULL AS `parent_cost_centre___target_type`,
- NULL AS `parent_cost_centre___target_bundle`,
- `total_budget_value`.`id` as `total_budget_value___id`,
- NULL AS `year___id`,
- NULL AS `year___target_id`,
- NULL AS `year___target_type`,
- NULL AS `year___target_bundle`
- from
- `field_calculated__total_budget_value` as `total_budget_value`
- where
- (
- `entity_id` = 111
- and `entity_type` = 'budget'
- and `entity_bundle` = 'record'
- )
- )
- union
- (
- select
- NULL AS `opex_budget___id`,
- NULL AS `opex_budget___opex_id`,
- NULL AS `opex_budget___currency_code`,
- NULL AS `opex_budget___forecast`,
- NULL AS `opex_budget___value`,
- NULL AS `opex_budget___comment`,
- NULL AS `parent_cost_centre___id`,
- NULL AS `parent_cost_centre___target_id`,
- NULL AS `parent_cost_centre___target_type`,
- NULL AS `parent_cost_centre___target_bundle`,
- NULL AS `total_budget_value___id`,
- `year`.`id` as `year___id`,
- `year`.`target_id` as `year___target_id`,
- `year`.`target_type` as `year___target_type`,
- `year`.`target_bundle` as `year___target_bundle`
- from
- `field_category__year` as `year`
- where
- (
- `entity_id` = 111
- and `entity_type` = 'budget'
- and `entity_bundle` = 'record'
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement