Processing LONG RAW in the trigger

I'm currently using Oracle 7.3.4.x. I'd like to perform in the
update trigger of LONG RAW column the copy of that value to
another table. Since the :new and :old is prohibited in triggers
and you cannot defined variables as LONG RAW data type in the
trigger I couldn't work out any solution to this problem.
Any one get any idea how to do that?
Thanks,
Mariusz.

Hi!
You will not be able to do "select * from ..." from a table with a LONG column. However you will be able to do a select successfully by using the individual column name(s). The other thing is, in order to see the full content of the LONG column you will have to do do "set long nnnnn" where nnnnn represents the maxumum length of the values in the LONG column.
Hope that helps.
null

Similar Messages

  • How to get image out from LONG RAW from the database

    Dear fellow Oracle users
    I have a table about 50,000 rows one of the the column is LONG RAW.. and we store image files within this column ... almost 99% is gif format.
    Does anyone able to recommand a way to get ALL these images out of the database and save it into a directory. May be a batch process or may be some kind of tools?
    Not all the rows consists of images (i.e some of the the long raw can be null for some row) .
    Any sample codes are very much appreciated...(I am okay with PL/SQL , a little rusty with Java coding but okay to pick it up again...)
    regards
    Ivan

    Hi,
    if u are using oracle forms than u can integrate Webutil with it, there are many function available within webutil to do this.
    Thanks

  • Restrict the LONG RAW Column with less than 32760 bytes in the SELECT

    When i am trying to access a LONG RAW Dataype wchich has characters greter than 32760 bytes i am getting this error.
    Error -6502: ORA-06502: PL/SQL: numeric or value error
    I came to know that PL/SQL will only be able to access the first 32760 bytes of a LONG RAW. If we try to fetch a LONG RAW from the database into PL/SQL variable which exceeds the 32760 byte limit then we encountered the above error.
    Can anyone tell to avoid this error can we write a query to restrict the output to get only those records which has LONG RAW length less than 32760 bytes.
    Since we canot use utl_raw.length() in the Select Statement, is there any function to restrict the the records for less than 32760 Bytes only for LONG RAW datatype, so that i will not get any records for more than 32760 bytes and we will not get this error.
    REquest you to please help.

    Hi
    we do not have an option of migrating the LONG RAW to BLOB or any kind of ALTER to the table.
    We want to restrict the use of Records from the Table which has data for LONG RAW column less than 32760 bytes, so that we will not get the PL/SQL numberic Error
    any function for LONG RAW that can be used in SQL like for varchar2 we can use
    select length(NAME) < 100 from tb_emp+
    i.e it will get records only which has NAME less than 100 characters.

  • Batch process to generate thumbnail pictures from a long raw column

    Hello,
    I need to generate thumbnail pictures from already existing pictures. The existing pictures are stored in a long raw column, the option to convert to BLOB col is not possible at the moment so I'm stuck with long raws.
    Is there an easy way to generate those new pictures? do I have to build a form to download the picture, resize it and then upload it to the db in a loop for 16,000 pictures?
    Any ideas would be appreciated.
    Thanks,

    Sarvan,
    You can have MRP propose two lots of SFG2 based upon lot sizing.  For instance, if you always will want SFG2 to have orders of 50 each, then one way to achieve this would be to set the 'maximum lot size' to 50.  MRP1 Tab of the material master.
    There are other lotsizing methodologies that may be better suited to your business requirements as well.
    Lot-Size Calculation - Consumption-Based Planning (MM-CBP) - SAP Library
    Best Regards,
    DB49

  • Slow performance with long raw data

    Hi all,
    we are running a 8i on linux (suse 6.2). everything is fine, but
    when we try to select data from a table with two number and one
    long raw fields the performance is real low.
    data were exported from a 7.0.3 server running on a solaris box.
    the new server is much more performant then the sun box, only
    this one table doesnt work correct.
    Any ideas what i did wrong? more details could be supplied if
    needed.
    Li
    null

    Caitanya wrote:
    Blushadow,
    I thought this is how a Cursor loop works:
    ..cut..
    you need not fetch it again inside the loop? you fetch it once and the loop takes care of implicitly fetching one record at a time in the cursor.
    Please correct me if I am wrong.Yes, typically a cursor loop starts the loop, then fetches and then tests for exit condition before processing.
    The style the OP is using comes from the old BASIC style where we had REPEAT..UNTIL loops. The condition for these loops, due to their syntax, was specified on the UNTIL part e.g.
    REPEAT
      .. code ..
    UNTIL <condition>;This meant that the code would always be executed once and therefore, to prevent the code executing unecessarily you would have to code something like... (excuse my pseudo code)
    IF <condition> = TRUE THEN
      REPEAT
        .. code ..
      UNTIL <condition>
    END IF;So, in terms of what the OP is doing, they are fetching the first row outside the loop, using the condional check as the first thing inside the loop to prevent execution of the code if it's unnecessary, and then at the end of the loop fetching the next row before looping back around to the conditional check. Typically, you wouldn't do it that way, but it's fine and does work.

  • How to insert data from file into long raw field using utl_file?

    I try to insert binary data from a file (under AIX 4.3.3) into a LONG
    RAW field (Oracle 8.1.6).
    First, I retrieve the data from the file like this:
    DECLARE
    FileHandle = UTL_FILE.FILE_TYPE;
    myVariable LONG RAW;
    FileHandle := UTL_FILE.FOPEN ;('prj/oracle/admin/MARTIJN/udump',
    'MyFile.ATT', 'R');
    UTL_FILE.GET_LINE (FileHandle, myVariable);
    UTL_FILE.FCLOSE(FileHandle);
    INSERT INTO myTable(DUMMYFIELD) VALUES(myVariable);
    Where DUMMYFIELD of table myTable is of type LONG RAW.
    The GET_LINE statement crashes on Oracle Error ORA-6502: Numeric of
    Value error: hex to raw conversion error.
    What do I do wrong?
    Do I use the right method to retrieve information from a file and put
    it into a long raw field, should I try it another way?
    Any help greatly appreciated,
    Martijn Rutte

    Zarina,
    To clarify your problem, you have a script node contaning your Matlab code. Are you then using the standard LV functions to load in your data from a file and pass it into the script node?
    Regards
    Tristan

  • Modify long raw to blob column

    Hello,
    I would like to know if it is possible to modify a long raw column into a blob column, without having to drop and recreate my table.
    There is already data inserted in the long raw column.
    Thanks in advance,
    Cindy

    'Fraid not.
    A LOB is stored "out-of-line", which means the actual "raw" data is held separately from the table. A long raw stores the data in-line. This means that you'll have to write some code to extract the "raw" data and write it to the LOB. Methinks you won't be able to add a LOB-type column to the table if you have a long raw existing in it already.

  • Long Raw Picture not showing in adf

    I have used following servlet to show long raw picture. the problem is in line
    Blob blob = rs.getBlob("PLAN_PIC"); 
    The oracle column is Long Raw  and in ADF table this column shows as Raw. I have tried to use Raw class but could not identify proper functions. For example I used      Long blob=rs.getLong("PLAN_PIC"); it is ok but then how to get its buffered binary stream because getBinaryStream() does not work for long. I also tried to use to_blob function to convert long raw column to blob but it also gives ora-0932 error. The same table shows picture in oracle form and also Dot Net developer showed the same picture. Kindly help.
    //servlet code is
    public class imageservlet extends HttpServlet {
       // private static final String CONTENT_TYPE = "text/html; charset=UTF-8";   ( I checked both content types but nothing)
          private static final String CONTENT_TYPE =   "image/jpg; charset=utf-8";
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException,
                                                               IOException {
            response.setContentType(CONTENT_TYPE);
            String imageId = request.getParameter("id");
           // String imageId="4000";
            OutputStream os = response.getOutputStream();
            Connection conn = null;
            try {
                Context ctx = new InitialContext();
                //Datasource as defined in <res-ref-name> element of weblogic.xml
                DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/DYEDS");
                conn = ds.getConnection();
                PreparedStatement statement =
                    conn.prepareStatement("SELECT plan_no, plan_pic " +
                                          "FROM tblplanpics " +
                                          "WHERE plan_no = ?");
               // statement.setInt(1, new Integer(imageId));
                statement.setString(1,imageId);
                ResultSet rs = statement.executeQuery();
                if (rs.next()) {
                   Blob blob = rs.getBlob("PLAN_PIC");     
                    BufferedInputStream in =
                        new BufferedInputStream(blob.getBinaryStream());
                    int b;
                    byte[] buffer = new byte[10240];
                    while ((b = in.read(buffer, 0, 10240)) != -1) {
                        os.write(buffer, 0, b);
                    os.close();
            } catch (Exception e) {
                System.out.println(e);
            } finally {
                try {
                    if (conn != null) {
                        conn.close();
                } catch (SQLException sqle) {
                    System.out.println("SQLException error");

    The answers are the same as in your other thread https://forums.oracle.com/thread/2591893 about this issue.
    Timo

  • Getting LONG RAW from remote database

    Hi,
    I have a table in my local database that has a LONG RAW column . I have another table of similar structure in a remote database (so it has LONG RAW as well). I would like to transfer data including LONG RAW data from the remote database into the local database table using PL/SQL. I know it is not possible to copy LONG RAW over dblink directly. Can anyone suggest an approach to accomplish this?
    The local table cannot be changed to BLOB, but I have the flexibility to change the remote table to use BLOB. So, can anyone tell me if the following solution would work. If so, can you shed some light on what PL/SQL libraries to use or can you provide me with some sample code to implement steps 3 and 4 below?:
    1. Change the remote table to use BLOB
    2. Create a new temporary table with BLOB in the local database.
    3. Copy data using PL/SQL from remote BLOB to local temporary table BLOB.
    4. Copy data using PL/SQL from BLOB to LONG RAW within the local database from temporary table (w/ BLOB) to the actual target table (w/ LONG RAW).
    I think step 3 can be a direct Insert-Select from remote table (I'll try this myself), but not sure how to go about step 4.
    Thanks for your help.

    There is a chapter in the Oracle Application Developer's Guide on calling external procedures
    I don't know enough about VB and the available VB APIs to know for sure. I would assume that VB could be configured to generate a DLL with a C call specification. I would also assume that there was a VB API that would allow you to manipulate LONG RAW and BLOB data. Unfortunately, though, I don't know which VB API's have that functionality.
    Justin

  • Extracting Tiff files stored into Oracle 8.1.7 as Long Raw

    I have around 1 million tiff images stored into Oracle 8.1.7. The field type is Long Raw. The frontend used to store images into the database is SQL Windows 5 from Gupta Corporation, now called Centura. I guess the images are stored in binary format in the database. I need to extract these images at the OS level. Each Rec_no contains one tiff file in database. The table structure is as follows:
    Rec_no Number(8)
    image Long Raw
    My goal is to convert these tiff files to JPG files so that my web application written in ASP.Net can use them and show in IE. The files are required to be converted to jpg as IE does not have native support for showing the tiff files(I hope I am not wrong in this assumption). Can i convert these tiffs to jpg directly inside the oracle database??? or i need to extract them first, save at OS level, convert them and then write back to the database?? Pls give code examples if possible. I plan to migrate the database also from 8i to 10g shortly and this is one of the migration taks. Thanks in advance...
    Ravinder Hooda

    I have around 1 million tiff images stored into Oracle 8.1.7. The field type is Long Raw. The frontend used to store images into the database is SQL Windows 5 from Gupta Corporation, now called Centura. I guess the images are stored in binary format in the database. I need to extract these images at the OS level. Each Rec_no contains one tiff file in database. The table structure is as follows:
    Rec_no Number(8)
    image Long Raw
    My goal is to convert these tiff files to JPG files so that my web application written in ASP.Net can use them and show in IE. The files are required to be converted to jpg as IE does not have native support for showing the tiff files(I hope I am not wrong in this assumption). Can i convert these tiffs to jpg directly inside the oracle database??? or i need to extract them first, save at OS level, convert them and then write back to the database?? Pls give code examples if possible. I plan to migrate the database also from 8i to 10g shortly and this is one of the migration taks. Thanks in advance...
    Ravinder Hooda

  • I can not put the data of a field(LONG RAW) consulted into a item of a data block

    I want to query a field that is LONG RAW(it's a image) and put the data into a item of a data block (in Forms Builder), when i write ":BLOCK.FOTO:=vfoto" i recieve this errors: "bad bind variable ....". How can i put the data of field of my DB and put the data in a item of a data block(in Forms Builder)?.
    I can store a image in a table of my DB, but i want to query a image stored in my DB and put it into anothers table, all this on FORMS BUILDER.

    You have to base the image item on a base table and use EXECUTE_QUERY on that block. You can't do a direct select in PL/SQL into the item

  • Ability to process several raw files with the same content but with different exposure into the single picture

    Can you add to the Lightroom an ability to process several raw files with the same content but with different exposure into the single picture?
    Base raw files can be given with exposure bracketing during shooting, for example.
    The goal - to get maximum details in darks and lights (if we use the "ligths recovery" or "fill lights" we lose the quality because raw file just have no all required information).
    The similar (but not the same, only the idea) thing - is High Dynamic Range Photography in Adobe Photoshop
    Thank you

    The plugin LR/Enfuse does this already. And of course Photomatix have a plugin available for Lightroom. This essentially amounts to pixel editing, which is beyond the range of Lightroom's metadata editing.

  • Editing RAW files processed in iPhoto in the Windows version of Photoshop?

    Although a fairly competent photographer I am new to digital image making/processing. Happily a professional photographer friend with a great deal of expertise in the digital area has offered to help me make some 13x19" prints I need for a job I'm completing. My friend as a very sophisticated facility for processing images and making prints so I pretty excited to have this opportunity.
    Trouble is he uses a Windows version of Photoshop and has no experience with iPhoto, or for that matter Mac stuff in general.
    My question is that I have some images shot RAW in 8 Megapixle Olympus E-300 and tuned up a bit in iPhoto 6. As I understand it iPhoto first converts RAW images into jpeg before processing and then outputs the edited images in that format. My friend, on the other hand, prefers to work with TIFF files.
    How should I copy both the RAW and TIFF format images I have in iPhoto to a CD that will allow me to transfer the images I wish to print to my friends Window machine for editing in Photoshop?
    Thanks!
    Win

    I suggest that you export the photos with kind = original which will give your your unedited RAW files - if you want the edited versions export with kind = TIFF if you want TIFF copies of the edited versions
    Export these to a desktop folder and then burn that folder to a CD to take on your adventure
    LN

  • How to find the long/raw datatype tables

    HI ppl,
    I want to find out the long/raw datatype tables in Oracle database.
    Please provide the query..
    Plz help.
    Oracle version :10gr2
    platform:HP-UNIX

    Hi,
    is this is what you are looking for?
    SELECT
         TABLE_NAME,
          COLUMN_NAME,
          OWNER
    FROM
          DBA_TAB_COLUMNS
    WHERE
          DATA_TYPE IN('LONG','RAW')Regards

  • Would like to purchase PSE 12 to process Camera Raw files for the following cameras: Nikon D800, Nikon DF, Canon G9 and Pentax K-3 does the Raw Converter that comes with  PSE 12 when purchased recognize  the cameras listed in the question or do I need to

    Would like to purchase PSE 12 to process Camera Raw files for the following cameras: Nikon D800, Nikon DF, Canon G9 and Pentax K-3 does the Raw Converter that comes with  PSE 12 when purchased recognize  the cameras listed in the question or do I need to download  the camera Raw Version 8.3 ?

    While the G9 RAW files can be read by Adobe Camera RAW and Lightroom, these file are unsupported at this time. Here is a link to Adobe's latest list of cameras that are supported and this list came out yesterday http://www.adobe.com/products/photoshop/cameraraw.html
    I have not done a comparison between Lightroom and Canon's software but others have and say that Canon's software is clearly better. I am sure when Adobe updates their software again to include the G9 it will be a very good RAW converter as it is will most other cameras.

Maybe you are looking for

  • Epiphany crashing[solved]

    Epiphany crashes when a tab is closed, and also when closing the window (that is, the gnome 'this application has crashed' dialogue comes up). I've just run pacman -Syu, and the error messages from the console look python related (which was upgraded

  • Lost password sqlplus

    i have problem here, i can't connect to sqlplus as sysdba because wrong pass, and i'm so sure i never put pass in sysdba i don't know why its happen to my sqlplus, for the information, before i lost my pass to sysdba, i'm in the middle installation b

  • Painting graph from loop?

    * I am having a hard time trying to figure out why this is not working * the input file is single line entries (these numbers are from the file and the format) * 1 * 891.67 * 1968.12 * 198031.88 * 2859.79 * 200000 * 5.35 * nl * 2 * 882.89 * 1976.9 *

  • App store categories

    How can I change the category in the app store from games to productivity?  In the app store clicking the lower categories button takes me to games, and there is no list to select another category.  The upper left button only allows for game subcateg

  • Confrmation of Rework & GR

    Hello All         I am processing an order of two pieces, while confirming that order i confirm 1EA as yield & 1EA as rework and am also mentioning the reason of variance while confirming the order. I have set manual GR against the order & when am do