src-db/database/model/views/AD_REF_LIST_V.xml
author Antonio Moreno <antonio.moreno@openbravo.com>
Wed, 23 Apr 2008 17:34:12 +0000
changeset 756 ae11e4610537
parent 737 database/model/views/AD_REF_LIST_V.xml@935386ff0f30
child 776 d1226b967a28
permissions -rw-r--r--
Moved database folder to src-db folder
adrian@94
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="VIEW AD_REF_LIST_V">
gorka@406
     3
    <view name="AD_REF_LIST_V"><![CDATA[SELECT ad_ref_list.ad_ref_list_id, ad_ref_list.value, to_char(ad_ref_list.name) AS name, 'en_US' AS ad_language, ad_ref_list.ad_reference_id
gorka@396
     4
   FROM ad_ref_list
antonio@737
     5
UNION
gorka@396
     6
 SELECT v1.ad_ref_list_id, v1.value, COALESCE(v1.name_trl, v2.name) AS name, v1.ad_language, v1.ad_reference_id
gorka@396
     7
   FROM ( SELECT ad_ref_list.ad_ref_list_id, ad_ref_list.value, to_char(ad_ref_list_trl.name) AS name_trl, '' AS name, ad_ref_list_trl.ad_language, ad_ref_list.ad_reference_id
gorka@396
     8
           FROM ad_ref_list, ad_ref_list_trl
gorka@396
     9
          WHERE ad_ref_list.ad_ref_list_id = ad_ref_list_trl.ad_ref_list_id) v1, ( SELECT ad_ref_list.ad_ref_list_id, ad_ref_list.value, to_char(ad_ref_list.name) AS name, ad_language.ad_language, ad_ref_list.ad_reference_id
gorka@396
    10
           FROM ad_ref_list, ad_language
gorka@396
    11
          WHERE ad_language.issystemlanguage = 'Y') v2
gorka@396
    12
  WHERE v1.ad_ref_list_id = v2.ad_ref_list_id AND v1.ad_reference_id = v2.ad_reference_id]]></view>
adrian@94
    13
  </database>