1.SELECT a.column_id,
a.COLUMN_NAME,
b.comments,
'<w:header label="'||b.comments||'" />' as header,
'<w:text label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_text,
'<w:span id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span,
'<w:span label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span2,
lower(a.table_name)||'.'||lower(a.column_name)||', --'||b.comments as sql_col,
lower(a.table_name)||'.'||lower(a.column_name)||',' as sql_col2
FROM user_tab_columns a,user_col_comments b,(select distinct aaa100 as aaa100 from aa10) c
where a.table_name = b.table_name and a.column_name =b.column_name
and a.column_name = c.aaa100(+) and b.comments not like '%备用%' and a.column_name not in ('BAZ001','BAZ002')
and a.table_name='KC04' ORDER BY COLUMN_ID;
b.comments,
'<w:header label="'||b.comments||'" />' as header,
'<w:header label="'||b.comments||'" column="'||lower(a.column_name)||'"/>' as header_column,
'<w:text label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_text,
'<w:span id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span,
'<w:span label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span2,
lower(a.table_name)||'.'||lower(a.column_name)||', --'||b.comments as sql_col,
lower(a.table_name)||'.'||lower(a.column_name)||',' as sql_col2
FROM user_tab_columns a,user_col_comments b,(select distinct aaa100 as aaa100 from aa10) c
where a.table_name = b.table_name and a.column_name =b.column_name
and a.column_name = c.aaa100(+) and b.comments not like '%备用%' and a.column_name not in ('BAZ001','BAZ002')
and a.table_name='KC48' ORDER BY COLUMN_ID;
a.COLUMN_NAME,
b.comments,
'<w:header label="'||b.comments||'" />' as header,
'<w:text label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_text,
'<w:span id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span,
'<w:span label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span2,
lower(a.table_name)||'.'||lower(a.column_name)||', --'||b.comments as sql_col,
lower(a.table_name)||'.'||lower(a.column_name)||',' as sql_col2
FROM user_tab_columns a,user_col_comments b,(select distinct aaa100 as aaa100 from aa10) c
where a.table_name = b.table_name and a.column_name =b.column_name
and a.column_name = c.aaa100(+) and b.comments not like '%备用%' and a.column_name not in ('BAZ001','BAZ002')
and a.table_name='KC04' ORDER BY COLUMN_ID;
2.SELECT a.column_id,
a.COLUMN_NAME,b.comments,
'<w:header label="'||b.comments||'" />' as header,
'<w:header label="'||b.comments||'" column="'||lower(a.column_name)||'"/>' as header_column,
'<w:text label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_text,
'<w:span id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span,
'<w:span label="'||b.comments||'" id="'||lower(a.column_name)||'" '||nvl2(c.aaa100,'codeType="'||c.aaa100||'"','')||' />' as col_span2,
lower(a.table_name)||'.'||lower(a.column_name)||', --'||b.comments as sql_col,
lower(a.table_name)||'.'||lower(a.column_name)||',' as sql_col2
FROM user_tab_columns a,user_col_comments b,(select distinct aaa100 as aaa100 from aa10) c
where a.table_name = b.table_name and a.column_name =b.column_name
and a.column_name = c.aaa100(+) and b.comments not like '%备用%' and a.column_name not in ('BAZ001','BAZ002')
and a.table_name='KC48' ORDER BY COLUMN_ID;