All pastes #904127 Raw Edit

Someone

public text v1 · immutable
·published 2008-02-14 19:05 UTC
rendered paste body
SET HEADING OFF
SET LINESIZE 320000
SET TRIMSPOOL ON
SET TRIMOUT   ON 
CREATE OR REPLACE VIEW TRANSLATION_Q AS
SELECT t."ID_TRANSLATION",t."ID_LANGUAGE",t."CODE_TRANSLATION",t."DESC_TRANSLATION",t."ADW_LAST_UPDATE",
       'insert_into_translation(' || id_language || ',''' ||
       REPLACE(REPLACE(code_translation, '''', ''''''), '@', '''||''@') || ''',''' ||
       REPLACE(REPLACE(desc_translation, '''', ''''''), '@', '''||''@') || ''');' query_insert,
       'UPDATE translation SET desc_translation = ''' ||
       REPLACE(REPLACE(desc_translation, '''', ''''''), '@', '''||''@') || ''' where code_translation = ''' ||
       REPLACE(REPLACE(code_translation, '''', ''''''), '@', '''||''@') || ''' AND id_language = ' || id_language || ';' query_update
  FROM translation t
 ORDER BY id_language, code_translation;
spool c:\log.sql
select query_insert from TRANSLATION_Q where desc_translation is not null and id_language = 4;
spool off