SET sql_create = 'create table zjb as ( select groupid from(select '||IN_FOCUSFIELD||',rank() over(order by '||IN_GROUPBY||' as groupid from '||IN_TBNAME||' a group by groupid having max(cast('||IN_FOCUSFIELD||'as int)) - min(cast('||IN_FOCUSFIELD||' as int)) >= '||V_TRENDSTEP||')))' || 'definition only IN ' ||IN_TABLESPACE|| ' INDEX IN ' ||IN_INDEXSPACE|| ' not logged initially';
附件:
s.sql (3.4 KB)