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