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查询的结果。我试图按照原样运行select语句,但它提供了一个例外,说它找不到提到的列。所以,我试着把列名称放在列的前面,它抱怨我需要使用INTO
,我也使用它,但它仍然不喜欢语法。select语句的pl/sql显示结果
和DATA_SCALE为空?这不是表格的一列USER_TAB_COLUMNS – Nathan 2012-07-23 15:34:04
@Nathan - [yes yes is](http://docs.oracle.com/cd/E14072_01/server.112/e10820/statviews_5459.htm); '数字中小数点右侧的数字'。 – 2012-07-23 15:49:17