Set ServerOutput on size 100000;
declare
countTab number := 0;
countCol number := 0;
currDate varchar2(30);
scale number := 0;
Begin
select count(*) into countCol from USER_TAB_COLUMNS where TABLE_NAME = 'EVAPP_INTERFACE' and COLUMN_NAME = 'TARGET_AMNT_LTV_NUM' and DATA_SCALE is null;
IF (countCol <> 0) then
DBMS_OUTPUT.put_line(' EVAPP_INTERFACE.TARGET_AMNT_LTV_NUM values begin');
execute immediate 'select APPSEQNO, TARGET_AMNT_LTV_NUM from evapp_interface where TARGET_AMNT_LTV_NUM > 999999999999';
END IF;
END;
\
我正在尝试显示选择查询的结果。我尝试按原样运行 select 语句,但它给出了一个异常,说它找不到提到的列。因此,我尝试将表名放在列的前面,它抱怨我需要使用INTO
,我也使用了它,但它仍然不喜欢这种语法。