Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Heterogeneous Services help needed

Status
Not open for further replies.

kutz13

IS-IT--Management
Feb 24, 2004
62
GB
We're using HS from an Oracle 10g instance to connect to a SQL server 2000 instance. We can use a 'select' query to find single values from a result set, but how do you return entire multiple rows? The syntax we use for single values is:
Code:
DECLARE
   c      INTEGER;
   nr     INTEGER;
   val1   VARCHAR2 (100);
BEGIN
   c := DBMS_HS_PASSTHROUGH.open_cursor@sqlserver;
   DBMS_HS_PASSTHROUGH.parse@sqlserver (c, 'select * from table1');

   LOOP
      nr := DBMS_HS_PASSTHROUGH.fetch_row@sqlserver (c);
      EXIT WHEN nr = 0;
      DBMS_HS_PASSTHROUGH.get_value@sqlserver (c, 1, val1);
      DBMS_OUTPUT.put_line (val1);
   END LOOP;

   DBMS_HS_PASSTHROUGH.close_cursor@sqlserver (c);
END;

Any help appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top