Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> cursors for a newbie

cursors for a newbie

From: Adam Turner <ATurner_at_concreteinc.com>
Date: Mon, 19 Feb 2001 10:32:26 -0800
Message-ID: <F001.002B825E.20010219103550@fatcity.com>

Hello listers.

I am trying to do a pretty simple thing, but I seem to keep getting hung up.

Here's the problem =

You cannot select LOB's accross a DB_Link - especially when that link is via HSODBC to an ACCESS file.

What I would like to do -
Select all the data from a remote table into a cursor - then break those varchar's into 4000 character bits and insert them into a local table. because of all the edge of support stuff this is and my lack of PL/SQL savvy I can't tell where I am making big errors and where the app itself is having problems.

If anyone has a few minutes to shed some light on cursors and dbms_output and keep me from pulling out my hair I really would appreciate it.

thanks

adam

Here's what I started with - this is the start of it - all I want to do is fetch each value into my variable and print the variable .. then it will be to take my variable and chop it into two variables and insert that into a local table :

DECLARE

        CURSOR MYCUR IS SELECT "duty" FROM telecoms_at_hsodbc;
        V_DUTY  VARCHAR(8000);
        V_DUTY1 VARCHAR(4000);
        V_DUTY2 VARCHAR(4000);


BEGIN
   OPEN MYCUR;
   LOOP

      FETCH MYCUR INTO V_DUTY;
         

  dbms_output.put_line(V_DUTY);
   END LOOP;
   CLOSE MYCUR;
END;
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Adam Turner
  INET: ATurner_at_concreteinc.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Feb 19 2001 - 12:32:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US