Home > database >  How to deal with the from variables
How to deal with the from variables

Time:09-15

Tmptable is processing variables and then to achieve under cycle tmptable fields from variables how to say?

CodePudding user response:

A little didn't understand your meaning, the from variables, refers to the inside of the select statement from then the table name?

CodePudding user response:

reference 1st floor js14982 response:
a little didn't understand your meaning, the from variables, refers to the inside of the select statement from then the table name?
to directly select * from variables (i.e., the above assignment TMPTABLE)

CodePudding user response:

reference 1st floor js14982 response:
a little didn't understand your meaning, the from variables, refers to the inside of the select statement from then the table name?
and to write inside the for loop

CodePudding user response:

 DECLARE 
Tb_name VARCHAR2 (20);
V_sql VARCHAR2 (2000);
The BEGIN
Tb_name:='dba_objects;
V_sql:='begin FOR I IN (SELECT * FROM' | | tb_name | | 'WHERE ROWNUM=1)
LOOP
Dbms_output. Put_line (i.o bject_name);
END LOOP;
end; ';
The EXECUTE IMMEDIATE v_sql;
END;

Use the code block

CodePudding user response:

V_TAB_PAGELOAD ICDPUB_C21. T_TMP_CXDX_PAGELOAD % ROWTYPE;
CURSOR SHORT_CUR IS
The SELECT T.S ID,
T.D ATA_NUMBER,
T.I D,
DECODE (T.S MS_MMS, 'messages',' 01 ', 'MMS', '02),
- T.M ATCHLENGTH,
- T.S ERVICETYPE,
T.L OCALFLAG,
T.S ERVICE_AREA,
T.W ORK_ORDER,
T.U PDATETYPE,
T.U PDATE_DESCRIPTION,
T.E C_ATTRIBUTE,
T.E C_NAME,
T.E NTERPRISE_CODE,
T.S ERVICE_CODE,
/* T.S HORTCODE,
T.S ERVERCODE, */
T.P ROTOCOL_TYPE,
T.A UTHENTICATION,
Tc ONNECTION.
Tc ONTROL_VALUE,
T.W AP_PUSH,
T.P LACE_ACCESS,
T.G ATEWAY_CODING,
T.A CCESS_IP,
T.P LATFORM_URL,
T.M MS_BANDWIDTH,
T.B EIJING,
T.S HANGHAI,
T.T IANJIN,
Tc HONGQING,
Todd Harper EILONGJIANG,
T.J ILIN,
T.L IAONING,
T.N EIMENG,
Todd Harper EIBEN,
Todd Harper EINAN,
T.G UANGDONG,
Todd Harper UBEI,
T.S HANDONG,
T.Z HEJIANG,
T.A NHUI,
T.J IANGSU,
T.J IANGXI,
T.Y Lin UNNAN,
T.N INGXIA,
T.Q INGHAI,
T.S HANXI1,
T.S HANXI3,
Todd Harper UNAN,
T.F UJIAN,
T.G UANGXI,
T.G UIZHOU,
Todd Harper AINAN,
T.S ICHUAN,
T.X IZANG,
T.X INJIANG,
T.G ANSU,
T.B USINESS_CONTACTS,
T.R EMARK,
T.A PPROVAL_STATUS,
T.F ROMDATE,
- T.O RIGINALDATE,
T.T ODATE,
T.O PERATIONTIME
The FROM ICDPUB_C21. T_TMP_CXDX_PAGELOAD T
WHERE T.S ID=I_SID
The ORDER BY T.I D; - define the cursor

Behind a defined reference fields so ahead of
V_TAB_PAGELOAD. Field
  • Related