I have a table q has the long raw field, and inside this field is stored figures, but I have another similar table q tb I have a long raw field, what I need to do is pass the figures that are stored in Table 1 for table 2 , but I'm having diffucades to give you the Long Raw fields, does anyone know how I can solve this ??
Copy Long Raw
- dr_gori
- Moderador
- Posts: 5024
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Make an insert!
Example:
There goes a link http://en.glufke.net/oracle/viewtopic.php?t=154
Example:
INSERT INTO tab1 (campo_long) (select campo_long from tabela2)
-
- Rank: Estagiário Júnior
- Posts: 1
- Joined: Mon, 06 Mar 2006 8:42 am
- Location: Maceió/AL
[Gerson Júnior]
Dear Dr_Gori, that in fact works, but only for BLOB fields, not for Long Raw. I am with the same difficulty as the friend, make a copy of Long Raw field, but I could not find a solution yet. Thanks for the tip, but unfortunately it does not work.
- dr_gori
- Moderador
- Posts: 5024
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
In fact, if you are using Bank 8 or higher, you should not be using Long Raw. It still exists only for compatibility purposes. You should be using a blob! (Hence it works the way it was indicated)
to copy from one table to another a LONG RAW field only with PL / SQL, it is half complicated:
* Make an Export of the table.
* Rename the table to the desired name using the Rename command
* Do the import you have created ...
See what Tom Kyte speaks Regarding: http://asktom.oracle.com/pls/ask/f?p=49 ... 8223421081
This cursor can be used if Long Raw has up to 32k
This routine is done in Java, but I believe it is not 100% tested. [[two]]
to copy from one table to another a LONG RAW field only with PL / SQL, it is half complicated:
* Make an Export of the table.
* Rename the table to the desired name using the Rename command
* Do the import you have created ...
See what Tom Kyte speaks Regarding: http://asktom.oracle.com/pls/ask/f?p=49 ... 8223421081
This cursor can be used if Long Raw has up to 32k
DECLARE
CURSOR MyCursor IS SELECT Field1, Field2, RawField FROM Table1;
vField1 integer;
vField2 varchar2(50);
vRawField long raw;
iCount integer;
BEGIN
iCount := 0;
OPEN MyCursor;
LOOP
FETCH MyCursor INTO vField1, vField2, vRawField;
EXIT WHEN MyCursor%NOTFOUND;
iCount := iCount + 1;
INSERT INTO Table2 (T2Field1, T2Field2, T2RawField)
VALUES (vField1, vField2, vRawField);
--Commit every 10 rows
IF iCount = 10 THEN
iCount := 0;
COMMIT;
END IF;
END LOOP;
COMMIT;
CLOSE MyCursor;
END;
-
- Rank: Estagiário Júnior
- Posts: 1
- Joined: Thu, 17 Mar 2022 3:54 pm
- Location: Guarapuava/PR
Topic under translation. Come back later. (This is an automatic message)
-
- Information
-
Who is online
Users browsing this forum: No registered users and 9 guests