Pandafuchs

Untitled

Aug 1st, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.62 KB | None | 0 0
  1. --
  2. select sysdate
  3. from dual;
  4. --
  5. --
  6. /*******************************************************************************
  7. * ???
  8. *
  9. *
  10. *
  11. * Author Date Description
  12. * -------- ---------- -------------------------------------------------------*
  13. * WWirns 19.10.2017 Added
  14. * WWirns 23.11.2017 Column OWNER added
  15. * WWirns 08.12.2017 Delete statement added
  16. *******************************************************************************/
  17. --
  18. --
  19. /*
  20. --
  21. select STMT
  22. from (
  23. --
  24. select case
  25. when (rownum = 1) then
  26. ' select '
  27. else
  28. ' union select '
  29. end || 'unistr(''' || asciistr(replace(t1.MESSAGE_KEY
  30. ,''''
  31. ,'''''')) || ''')'
  32. --
  33. || case
  34. when (mod(rownum
  35. ,1000) = 1) then
  36. ' as MESSAGE_KEY'
  37. else
  38. ''
  39. end
  40. --
  41. --
  42. || ', ''' || t1.LOCALE || ''''
  43. --
  44. || case
  45. when (mod(rownum
  46. ,1000) = 1) then
  47. ' as LOCALE'
  48. else
  49. ''
  50. end
  51. --
  52. --
  53. || ', unistr(''' || asciistr(replace(t1.MESSAGE_VALUE
  54. ,''''
  55. ,'''''')) || ''')'
  56. --
  57. || case
  58. when (mod(rownum
  59. ,1000) = 1) then
  60. ' as MESSAGE_VALUE'
  61. else
  62. ''
  63. end
  64. --
  65. --
  66. || ', unistr(''' || asciistr(replace(t1.NOTICE
  67. ,''''
  68. ,'''''')) || ''')'
  69. --
  70. || case
  71. when (mod(rownum
  72. ,1000) = 1) then
  73. ' as NOTICE'
  74. else
  75. ''
  76. end
  77. --
  78. --
  79. || ' from dual' as STMT
  80. ,rownum as ROW_NUM
  81. from (
  82. --
  83. select t.*
  84. from DL_COMMON.MESSAGES$I18N t
  85. where exists (select null
  86. from DL_COMMON.MESSAGES e
  87. where e.MESSAGE_KEY = t.MESSAGE_KEY
  88. and e.OWNER = 'DL_BORDERCONTROL')
  89. order by t.MESSAGE_KEY
  90. ,t.LOCALE
  91. --
  92. ) t1
  93. --
  94. )
  95. where ROW_NUM between 1 and 1000
  96. --
  97. ;
  98. --
  99. */
  100. --
  101. --
  102. --
  103. -- *** Part 01 **********************************************************************************************
  104. --
  105. --
  106. -- !!! "delete from DL_COMMON.MESSAGES$I18N" is not needed because of "foreign key cascade" !!!
  107. --
  108. --
  109. merge into DL_COMMON.MESSAGES$I18N dest
  110. using (
  111. --
  112. -- NoFormat Start
  113. --
  114. select unistr('BMBS\005C17\005CDA_ChildrenAdded\005CAction_Seq10\005C1') as MESSAGE_KEY, 'th_TH' as LOCALE, unistr('\0E40\0E1E\0E34\0E48\0E21\0E40\0E14\0E47\0E01 - \0E17\0E31\0E49\0E07\0E2B\0E21\0E14:') as MESSAGE_VALUE, unistr('') as NOTICE from dual
  115. union select unistr('BMBS\005C17\005CREG_MANUAL_BTNS\005CP17_AUTOPROCESSPASSPORT\005C1'), 'th_TH', unistr('\0E2D\0E31\0E15\0E42\0E19\0E21\0E31\0E15\0E34'), unistr('') from dual
  116. union select unistr('BMBS\005C17\005CREG_MANUAL_BTNS\005CP17_AUTOPROCESSPASSPORT\005C2'), 'th_TH', unistr('\0E14\0E49\0E27\0E22\0E21\0E37\0E2D'), unistr('') from dual
  117. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C1'), 'th_TH', unistr('\0E01\0E23\0E38\0E13\0E32\0E2A\0E41\0E01\0E19\0E25\0E32\0E22\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E16\0E31\0E14\0E44\0E1B'), unistr('') from dual
  118. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C10'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E42\0E1B\0E49\0E07 \0E21\0E37\0E2D\0E02\0E27\0E32'), unistr('') from dual
  119. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C11'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E0A\0E35\0E49 \0E21\0E37\0E2D\0E02\0E27\0E32'), unistr('') from dual
  120. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C12'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E01\0E25\0E32\0E07 \0E21\0E37\0E2D\0E02\0E27\0E32'), unistr('') from dual
  121. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C13'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E19\0E32\0E07 \0E21\0E37\0E2D\0E02\0E27\0E32'), unistr('') from dual
  122. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C14'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E01\0E49\0E2D\0E22 \0E21\0E37\0E2D\0E02\0E27\0E32'), unistr('') from dual
  123. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C15'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E42\0E1B\0E49\0E07 \0E21\0E37\0E2D\0E0B\0E49\0E32\0E22'), unistr('') from dual
  124. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C16'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E0A\0E35\0E49 \0E21\0E37\0E2D\0E0B\0E49\0E32\0E22'), unistr('') from dual
  125. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C17'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E01\0E25\0E32\0E07 \0E21\0E37\0E2D\0E0B\0E49\0E32\0E22'), unistr('') from dual
  126. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C18'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E19\0E32\0E07 \0E21\0E37\0E2D\0E0B\0E49\0E32\0E22'), unistr('') from dual
  127. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C19'), 'th_TH', unistr('\0E19\0E34\0E49\0E27\0E01\0E49\0E2D\0E22 \0E21\0E37\0E2D\0E0B\0E49\0E32\0E22'), unistr('') from dual
  128. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C2'), 'th_TH', unistr('\0E25\0E32\0E22\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E44\0E21\0E48\0E15\0E23\0E07\0E01\0E31\0E1A\0E17\0E35\0E48\0E1A\0E31\0E19\0E17\0E36\0E01\0E44\0E27\0E49\0E43\0E19 Chip'), unistr('') from dual
  129. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C20'), 'th_TH', unistr('\0E04\0E38\0E13\0E20\0E32\0E1E'), unistr('') from dual
  130. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C21'), 'th_TH', unistr('\0E04\0E38\0E13\0E20\0E32\0E1E NIST \0E44\0E1F\0E25\0E4C'), unistr('') from dual
  131. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C3'), 'th_TH', unistr('\0E25\0E32\0E22\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E44\0E21\0E48\0E15\0E23\0E07\0E01\0E31\0E1A\0E17\0E35\0E48\0E1A\0E31\0E19\0E17\0E36\0E01\0E43\0E19\0E1B\0E23\0E30\0E27\0E31\0E15\0E34\0E01\0E32\0E23\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  132. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C4'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E02\0E49\0E2D\0E21\0E39\0E25\0E16\0E39\0E01\0E15\0E49\0E2D\0E07'), unistr('') from dual
  133. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C5'), 'th_TH', unistr('\0E40\0E2A\0E23\0E47\0E08\0E2A\0E34\0E49\0E19\0E01\0E32\0E23\0E25\0E07\0E17\0E30\0E40\0E1A\0E35\0E22\0E19'), unistr('') from dual
  134. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C7'), 'th_TH', unistr('\0E25\0E32\0E22\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E44\0E21\0E48\0E15\0E23\0E07\0E01\0E31\0E19 \0E01\0E23\0E38\0E13\0E32\0E27\0E32\0E07\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E16\0E31\0E14\0E44\0E1B'), unistr('') from dual
  135. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C8'), 'th_TH', unistr('\0E27\0E32\0E07\0E21\0E37\0E2D\0E1A\0E19\0E40\0E04\0E23\0E37\0E48\0E2D\0E07\0E2A\0E41\0E01\0E19\0E44\0E21\0E48\0E15\0E23\0E07\0E01\0E31\0E1A\0E21\0E37\0E2D\0E17\0E35\0E48\0E01\0E33\0E2B\0E19\0E14'), unistr('') from dual
  136. union select unistr('BMBS\005C17\005CSAF\005CFingerprintManagement_JS\005C9'), 'th_TH', unistr('\0E08\0E33\0E19\0E27\0E19\0E19\0E34\0E49\0E27\0E44\0E21\0E48\0E04\0E23\0E1A\0E15\0E32\0E21\0E17\0E35\0E48\0E01\0E33\0E2B\0E19\0E14 (@NUMBER \0E19\0E34\0E49\0E27) \0E01\0E23\0E38\0E13\0E32\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E21\0E37\0E2D\0E1C\0E39\0E49\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  137. union select unistr('BMBS\005C17\005CWorkflow_js\005C10'), 'th_TH', unistr('\0E08\0E31\0E1A\0E20\0E32\0E1E\0E25\0E32\0E22\0E1E\0E34\0E21\0E1E\0E4C\0E19\0E34\0E49\0E27\0E21\0E37\0E2D'), unistr('') from dual
  138. union select unistr('BMBS\005C17\005CWorkflow_js\005C11'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E1E\0E1A\0E25\0E32\0E22\0E1E\0E34\0E21\0E1E\0E4C\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E15\0E23\0E07\0E01\0E31\0E1A\0E02\0E49\0E2D\0E21\0E39\0E25\0E43\0E19\0E2B\0E19\0E31\0E07\0E2A\0E37\0E2D\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  139. union select unistr('BMBS\005C17\005CWorkflow_js\005C12'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E1E\0E1A\0E25\0E32\0E22\0E1E\0E34\0E21\0E1E\0E4C\0E19\0E34\0E49\0E27\0E21\0E37\0E2D\0E15\0E23\0E07\0E01\0E31\0E1A\0E02\0E49\0E2D\0E21\0E39\0E25\0E43\0E19\0E1B\0E23\0E30\0E27\0E31\0E15\0E34\0E01\0E32\0E23\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  140. union select unistr('BMBS\005C17\005CWorkflow_js\005C13'), 'th_TH', unistr('\0E41\0E2A\0E01\0E19\0E2B\0E19\0E49\0E32\0E27\0E35\0E0B\0E48\0E32'), unistr('') from dual
  141. union select unistr('BMBS\005C17\005CWorkflow_js\005C14'), 'th_TH', unistr('\0E41\0E2A\0E01\0E19\0E1A\0E31\0E15\0E23\0E15\0E23\0E27\0E08\0E04\0E19\0E40\0E02\0E49\0E32\0E40\0E21\0E37\0E2D\0E07'), unistr('') from dual
  142. union select unistr('BMBS\005C17\005CWorkflow_js\005C15'), 'th_TH', unistr('\0E04\0E31\0E14\0E40\0E25\0E37\0E2D\0E01'), unistr('') from dual
  143. union select unistr('BMBS\005C17\005CWorkflow_js\005C16'), 'th_TH', unistr('\0E17\0E32\0E07\0E01\0E32\0E23\0E1A\0E34\0E19'), unistr('') from dual
  144. union select unistr('BMBS\005C17\005CWorkflow_js\005C17'), 'th_TH', unistr('\0E17\0E32\0E07\0E40\0E23\0E37\0E2D'), unistr('') from dual
  145. union select unistr('BMBS\005C17\005CWorkflow_js\005C18'), 'th_TH', unistr('\0E17\0E32\0E07\0E1A\0E01'), unistr('') from dual
  146. union select unistr('BMBS\005C17\005CWorkflow_js\005C19'), 'th_TH', unistr('\0E02\0E49\0E2D\0E21\0E39\0E25\0E1A\0E38\0E04\0E04\0E25\0E40\0E1B\0E47\0E19\0E1A\0E38\0E04\0E04\0E25\0E15\0E49\0E2D\0E07\0E2B\0E49\0E32\0E21'), unistr('') from dual
  147. union select unistr('BMBS\005C17\005CWorkflow_js\005C20'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E02\0E49\0E2D\0E21\0E39\0E25\0E2B\0E19\0E31\0E07\0E2A\0E37\0E2D\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  148. union select unistr('BMBS\005C17\005CWorkflow_js\005C21'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E2B\0E23\0E37\0E2D\0E17\0E33\0E01\0E32\0E23\0E41\0E2A\0E01\0E19\0E25\0E32\0E22\0E1E\0E34\0E21\0E1E\0E4C\0E19\0E34\0E49\0E27\0E21\0E37\0E2D'), unistr('') from dual
  149. union select unistr('BMBS\005C17\005CWorkflow_js\005C22'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E2B\0E23\0E37\0E2D\0E17\0E33\0E01\0E32\0E23\0E16\0E48\0E32\0E22\0E20\0E32\0E1E'), unistr('') from dual
  150. union select unistr('BMBS\005C17\005CWorkflow_js\005C23'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E41\0E25\0E30\0E01\0E23\0E2D\0E01\0E02\0E49\0E2D\0E21\0E39\0E25\0E27\0E35\0E0B\0E48\0E32, \0E1A\0E31\0E15\0E23\0E15\0E23\0E27\0E08\0E04\0E19\0E40\0E02\0E49\0E32\0E40\0E21\0E37\0E2D\0E07\0E2B\0E23\0E37\0E2D\0E02\0E49\0E2D\0E21\0E39\0E25\0E40\0E17\0E35\0E48\0E22\0E27\0E1A\0E34\0E19'), unistr('') from dual
  151. union select unistr('BMBS\005C17\005CWorkflow_js\005C24'), 'th_TH', unistr('\0E21\0E35\0E04\0E27\0E32\0E21\0E08\0E33\0E40\0E1B\0E47\0E19\0E15\0E49\0E2D\0E07\0E15\0E23\0E27\0E08\0E2A\0E38\0E02\0E20\0E32\0E1E\0E2B\0E23\0E37\0E2D\0E44\0E21\0E48'), unistr('') from dual
  152. union select unistr('BMBS\005C17\005CWorkflow_js\005C25'), 'th_TH', unistr('\0E01\0E23\0E2D\0E01\0E40\0E25\0E02 \0E15\0E21.6 \0E41\0E25\0E49\0E27'), unistr('') from dual
  153. union select unistr('BMBS\005C17\005CWorkflow_js\005C3'), 'th_TH', unistr('\0E2B\0E21\0E32\0E22\0E40\0E25\0E02\0E40\0E0A\0E47\0E04 \0E2B\0E19\0E31\0E07\0E2A\0E37\0E2D\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  154. union select unistr('BMBS\005C17\005CWorkflow_js\005C4'), 'th_TH', unistr('\0E27\0E31\0E19\0E2B\0E21\0E14\0E2D\0E32\0E22\0E38\0E2B\0E19\0E31\0E07\0E2A\0E37\0E2D\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  155. union select unistr('BMBS\005C17\005CWorkflow_js\005C5'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E2A\0E2D\0E1A\0E02\0E49\0E2D\0E21\0E39\0E25\0E1A\0E38\0E04\0E04\0E25\0E15\0E49\0E2D\0E07\0E2B\0E49\0E32\0E21'), unistr('') from dual
  156. union select unistr('BMBS\005C17\005CWorkflow_js\005C6'), 'th_TH', unistr('\0E23\0E39\0E1B\0E2A\0E41\0E01\0E19\0E08\0E32\0E01\0E2B\0E19\0E31\0E07\0E2A\0E37\0E2D\0E40\0E14\0E34\0E19\0E17\0E32\0E07\0E15\0E23\0E07\0E01\0E31\0E19'), unistr('') from dual
  157. union select unistr('BMBS\005C17\005CWorkflow_js\005C7'), 'th_TH', unistr('\0E08\0E31\0E1A\0E20\0E32\0E1E\0E43\0E1A\0E2B\0E19\0E49\0E32'), unistr('') from dual
  158. union select unistr('BMBS\005C17\005CWorkflow_js\005C8'), 'th_TH', unistr('\0E15\0E23\0E27\0E08\0E1E\0E1A\0E20\0E32\0E1E\0E43\0E1A\0E2B\0E19\0E49\0E32\0E15\0E23\0E07\0E01\0E31\0E1A\0E20\0E32\0E1E\0E43\0E19\0E2B\0E19\0E31\0E07\0E2A\0E37\0E2D\0E40\0E14\0E34\0E19\0E17\0E32\0E07\0E2B\0E23\0E37\0E2D\0E43\0E19\0E0A\0E34\0E1B (Chip)'), unistr('') from dual
  159. union select unistr('BMBS\005C17\005CWorkflow_js\005C9'), 'th_TH', unistr('\0E20\0E32\0E1E\0E43\0E1A\0E2B\0E19\0E49\0E32\0E15\0E23\0E07\0E01\0E31\0E1A\0E17\0E35\0E48\0E1A\0E31\0E19\0E17\0E36\0E01\0E43\0E19\0E1B\0E23\0E30\0E27\0E31\0E15\0E34\0E01\0E32\0E23\0E40\0E14\0E34\0E19\0E17\0E32\0E07'), unistr('') from dual
  160. --
  161. -- NoFormat End
  162. --
  163. ) src
  164. on (src.MESSAGE_KEY = dest.MESSAGE_KEY and src.LOCALE = dest.LOCALE)
  165. when matched then
  166. update
  167. set dest.MESSAGE_VALUE = src.MESSAGE_VALUE
  168. ,dest.NOTICE = src.NOTICE
  169. where 1 = 1
  170. and (
  171. --
  172. DL_COMMON.PKG_UTIL.Is_Equal_(dest.MESSAGE_VALUE
  173. ,src.MESSAGE_VALUE) = 0
  174. --
  175. or DL_COMMON.PKG_UTIL.Is_Equal_(dest.NOTICE
  176. ,src.NOTICE) = 0
  177. --
  178. )
  179. when not matched then
  180. insert
  181. (MESSAGE_KEY
  182. ,LOCALE
  183. ,MESSAGE_VALUE
  184. ,NOTICE
  185. --
  186. )
  187. values
  188. (src.MESSAGE_KEY
  189. ,src.LOCALE
  190. ,src.MESSAGE_VALUE
  191. ,src.NOTICE
  192. --
  193. );
  194. --
  195. commit;
  196. --
  197. --
  198. --
Advertisement
Add Comment
Please, Sign In to add comment