src-db/database/model/views/AD_TABLE_POST_V.xml
author Eduardo Argal Guibert <eduardo.argal@openbravo.com>
Sat, 03 Apr 2010 15:59:56 +0200
changeset 6917 20af736f8ca9
parent 6912 38c773f35773
child 7022 825f121b6164
permissions -rw-r--r--
wrong views posstgre 8.4
adrian@94
     1
<?xml version="1.0"?>
adrian@94
     2
  <database name="VIEW AD_TABLE_POST_V">
juanpablo@1585
     3
    <view name="AD_TABLE_POST_V"><![CDATA[SELECT ad_table.ad_table_id, (COALESCE(to_char(w2.name), '') || 
eduardo@6917
     4
        CASE
eduardo@6917
     5
            WHEN w2.name IS NULL THEN ''
eduardo@6917
     6
            ELSE ' - '
eduardo@6917
     7
        END) || w1.name AS name, w1.ad_language, ad_table.ad_client_id, ad_table.ad_org_id, ad_table.isactive, ad_table.created, ad_table.createdby, ad_table.updated, ad_table.updatedby
eduardo@6917
     8
   FROM ad_table
eduardo@6917
     9
   LEFT JOIN ad_window_trl w1 ON ad_table.ad_window_id = w1.ad_window_id
antonio@777
    10
   LEFT JOIN ad_window_trl w2 ON ad_table.po_window_id = w2.ad_window_id
carlos@1784
    11
  WHERE (EXISTS ( SELECT c.ad_column_id, c.ad_client_id, c.ad_org_id, c.isactive, c.created, c.updated, c.createdby, c.updatedby, c.name, c.description, c.help, c.columnname, c.ad_table_id, c.ad_reference_id, c.ad_reference_value_id, c.ad_val_rule_id, c.fieldlength, c.defaultvalue, c.iskey, c.isparent, c.ismandatory, c.isupdateable, c.readonlylogic, c.isidentifier, c.seqno, c.istranslated, c.isencrypted, c.callout, c.vformat, c.valuemin, c.valuemax, c.isselectioncolumn, c.ad_element_id, c.ad_process_id, c.issessionattr, c.issecondarykey, c.isdesencryptable, c.ad_callout_id, c.developmentstatus
eduardo@6917
    12
   FROM ad_column c
eduardo@6917
    13
  WHERE ad_table.ad_table_id = c.ad_table_id AND c.columnname = 'Posted')) AND w1.ad_language = COALESCE(w2.ad_language, w1.ad_language) AND ad_table.isactive = 'Y'
antonio@776
    14
UNION 
eduardo@6917
    15
 SELECT ad_table.ad_table_id, (COALESCE(to_char(w2.name), '') || 
eduardo@6917
    16
        CASE
eduardo@6917
    17
            WHEN w2.name IS NULL THEN ''
eduardo@6917
    18
            ELSE ' - '
eduardo@6917
    19
        END) || w1.name AS name, 'en_US' AS ad_language, ad_table.ad_client_id, ad_table.ad_org_id, ad_table.isactive, ad_table.created, ad_table.createdby, ad_table.updated, ad_table.updatedby
eduardo@6917
    20
   FROM ad_table
eduardo@6917
    21
   LEFT JOIN ad_window w1 ON ad_table.ad_window_id = w1.ad_window_id
antonio@777
    22
   LEFT JOIN ad_window w2 ON ad_table.po_window_id = w2.ad_window_id
carlos@1784
    23
  WHERE (EXISTS ( SELECT c.ad_column_id, c.ad_client_id, c.ad_org_id, c.isactive, c.created, c.updated, c.createdby, c.updatedby, c.name, c.description, c.help, c.columnname, c.ad_table_id, c.ad_reference_id, c.ad_reference_value_id, c.ad_val_rule_id, c.fieldlength, c.defaultvalue, c.iskey, c.isparent, c.ismandatory, c.isupdateable, c.readonlylogic, c.isidentifier, c.seqno, c.istranslated, c.isencrypted, c.callout, c.vformat, c.valuemin, c.valuemax, c.isselectioncolumn, c.ad_element_id, c.ad_process_id, c.issessionattr, c.issecondarykey, c.isdesencryptable, c.ad_callout_id, c.developmentstatus
eduardo@6917
    24
   FROM ad_column c
eduardo@6917
    25
  WHERE ad_table.ad_table_id = c.ad_table_id AND c.columnname = 'Posted')) AND ad_table.isactive = 'Y']]></view>
adrian@94
    26
  </database>