Consultor Eletrônico



Kbase P117756: How to load the result of a sql-send-statement into a static TEMP-TABLE?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/3/2006
Status: Unverified

GOAL:

How to load the result of a sql-send-statement into a static TEMP-TABLE?

GOAL:

How to send a SQL statement to Oracle and load the results into a static TEMP-TABLE?

GOAL:

How to use the LOAD-RESULT-INTO statement with a static TEMP-TABLE?

FACT(s) (Environment):

OpenEdge 10.1A
DataServers

FIX:

DEFINE VARIABLE sql-string AS CHAR INITIAL
"select custNum, name, city from customer where custNum < 5".
DEF TEMP-TABLE tt1
FIELD cust-num AS INT LABEL "Customer Number"
FIELD cust-name AS CHAR LABEL "Customer Name"
FIELD cust-city AS CHAR LABEL "Customer City".
DEFINE VARIABLE tth AS HANDLE NO-UNDO.
tth = TEMP-TABLE tt1:HANDLE.
RUN STORED-PROC send-sql-statement LOAD-RESULT-INTO tth (sql-string).
FOR EACH tt1.
DISP cust-num cust-name.
END.