0

I am working on a project and In which there is a landing table where a long msg comes in the table continuously and Table has two column one ID and MSGTEXT(Long msg is stored in this column). That long msg have a lot of data from which I have to extract Unloaded Couriers details and Unloaded Volumes Couriers data and store in another table. Below is the msg sample.

<msg-header>
************ 

Couriers lifted
-------------
* NO Couriers items lifted *

 
Loaded Volumes  Items
-------------------
* NO Loaded Volumes  Items *
 
Unloaded Couriers
--------------
Courier_no/Courier box details 
Courier_no/Courier box details
Courier_no/Courier box details

Unloaded Volumes Couriers 
--------------------
Courier_no/Courier box details 
Courier_no/Courier box details
Courier_no/Courier box details
William Robertson
  • 15,273
  • 4
  • 38
  • 44

1 Answers1

0

You can retrieve the value of the sql-long column using a character datatype in pl/sql, i.e. pl/sql-long-Datatype.
Note: The pl/sql-long-Datatype is completely different from the sql-long-datatype.

For an example i assumed the table is named "curier".

declare
    strMSG  long; -- this is pl/sql-long-datatyp not sql-long-datatype!
begin
    for msgtab in (
      select id, msg
        from courier -- add your condition here
    ) loop
      -- do something with the data
      strMsg := msgtab.msg;
    end loop; 
end;
MagelanM
  • 58
  • 7