7 changed files with 88 additions and 19 deletions
@ -0,0 +1,53 @@ |
|||||||
|
--Freemarker Template |
||||||
|
--Achtung: Macro fügt Inhalte ein |
||||||
|
--Bitte nur Freemarker Variablen füllen |
||||||
|
<#assign sachgebiete_id=16 /> |
||||||
|
<#assign captions = [ |
||||||
|
{"table_name":"felderinfo", |
||||||
|
"field_name":"Beschv.-Nr.", |
||||||
|
"record_no":"48263", |
||||||
|
"contents_short":"@@SVA_LABEL_Beschv.-Nr.@@", |
||||||
|
"contents_long":""} |
||||||
|
] /> |
||||||
|
|
||||||
|
|
||||||
|
<#foreach caption in captions> |
||||||
|
delete from sx_captions where 1=0 |
||||||
|
<#if caption.table_name?exists && caption.table_name=="felderinfo"> |
||||||
|
or (table_name='${caption.table_name}' |
||||||
|
and field_name='${caption.field_name}' |
||||||
|
and record_no=${caption.record_no}) |
||||||
|
<#elseif caption.id?exists && caption.id!=""> |
||||||
|
or id='${caption.id}' |
||||||
|
</#if> |
||||||
|
; |
||||||
|
|
||||||
|
insert into sx_captions ( |
||||||
|
<#if caption.table_name?exists && caption.table_name=="felderinfo"> |
||||||
|
table_name, |
||||||
|
field_name, |
||||||
|
record_no, |
||||||
|
<#else> |
||||||
|
id, |
||||||
|
</#if> |
||||||
|
locale, |
||||||
|
contents_short, |
||||||
|
contents_long, |
||||||
|
sachgebiete_id) |
||||||
|
select |
||||||
|
<#if caption.table_name?exists && caption.table_name=="felderinfo"> |
||||||
|
'${caption.table_name}', |
||||||
|
'${caption.field_name}', |
||||||
|
${caption.record_no}, |
||||||
|
<#else> |
||||||
|
'${caption.id}', |
||||||
|
</#if> |
||||||
|
'de', |
||||||
|
'${caption.contents_short}', |
||||||
|
'${caption.contents_long}', |
||||||
|
${sachgebiete_id} |
||||||
|
from xdummy; |
||||||
|
|
||||||
|
</#foreach> |
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in new issue