Copy Long Raw from table 1 to another table in Oracle 8i
I have 2 similar tables in Oracle 8i.
Table 1:
Id number;
blob_obj long raw;
Table 2:
Table 1:
Id number;
blob_obj long raw;
Is there any way to copy the data from table to table 2 ?
Is it possible to do some conversions are load it ?
Kindly provide pointers for this issue.
See this thread Re: Getting LONG RAW from remote database for some useful ideas.
Regards Nigel
Similar Messages
-
Copy Long raw from oracle table to table
Hi
I am wondering if someone help me to move (copy) long raw data from one table to another. I want to do:
select long_raw_data from table1;
insert into table2 values (previously selected long raw value).
I wrote the following small java code, but it doesn't work. I get the following exception:
java.sql.SQLException: ORA-00936: missing expression.
---------- Code: ---------
import java.net.URL;
import java.sql.*;
class myJDBC
public static void main (String args[])
try {
Class.forName ("oracle.jdbc.driver.OracleDriver");
String url = "jdbc:oracle:thin:@test:1521:devtest";
Connection con = DriverManager.getConnection (url, "test", "test");
Statement stmt = con.createStatement ();
Statement insStmt = con.createStatement ();
ResultSet res = stmt.executeQuery (
"SELECT resume_data FROM resume where rownum < 26 ");
while (res.next ()) {
byte[] bytes = res.getBytes(1);
insStmt.executeUpdate("INSERT INTO TMP_RESUME VALUES (" + bytes + ")");
// clean-up
stmt.close ();
con.close ();
catch (Exception e) {
System.out.println (e.getMessage ());
e.printStackTrace ();
------------ Code ends ---------------
Thanks for your help
V Prakashuse PreparedStatement :
PreparedStatement insStmt = connect.prepareStatement("INSERT INTO TMP_RESUME VALUES (?)");
while (res.next ())
byte[] bytes = res.getBytes(1);
insStmt.setBytes(1,bytes);
insStmt.executeUpdate();
I don't remember very querys with ORACLE,
but you may be do this in one time with
SELECT ...... INTO ....
or
INSERT ..... INTO ..... SELECT
One of this is valid for ORACLE and the other for SYBASE ... -
Copy Long raw from one table to another.
Hi
I am trying to copy data from one table to another. Source has one Long Raw column. There are about million rows in source table. And I am using Oracle 8.1.5. Whenever I execute the copy command, I get the following error message: Can someone help me?
SQL> set long 64000000
SQL> set copycommit 1
SQL> set arraysize 100
SQL> COPY to test/test@testfix CREATE resume_bkup1 using select * from resume;
Array fetch/bind size is 100. (arraysize is 100)
Will commit after every array bind. (copycommit is 1)
Maximum long size is 64000000. (long is 64000000)
ERROR:
ORA-01084: invalid argument in OCI call
SQL>
Thanks
V Prakashinsert into emp_personal(emp_no, emp_pic) select emp_no, emp_pic from emp_personal_old where empno = '10059'
Read the documentation as suggested by sol.beach.
And fix your front-end to use supported datatypes. -
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-UNIXHi,
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 -
Moving Long Raw from one table to another
How to copy the record stored in a table which has Long Raw column and insert into another table
The follwoing code is giving a numeric or value error
declare
BLOB_ID NUMBER(12);
BLOB_FILE LONG RAW;
Cursor c1 is select
BLOB_ID ,
BLOB_FILE from test ;
Begin
Open c1;
Loop
Fetch c1 into
blob_id,
blob_file;
Exit when c1%notfound;
End loop;
Close c1;
End;I don't see any problem with your code. Are you sure that the type of your variables matches the datatypes of blob_id and blob_file?
sql>create table test (blob_id number(12), blob_file long raw);
Table created.
sql>create table test_copy (blob_id number(12), blob_file long raw);
Table created.
sql>insert into test values (1, utl_raw.cast_to_raw(lpad('x', 40, 'x')));
1 row created.
sql>declare
2 blob_id test.blob_id%type;
3 blob_file test.blob_file%type;
4 cursor c1 is
5 select blob_id, blob_file from test;
6 begin
7 open c1;
8 loop
9 fetch c1 into blob_id, blob_file;
10 exit when c1%notfound;
11 insert into test_copy values (blob_id, blob_file);
12 end loop;
13 close c1;
14 commit;
15 end;
16 /
PL/SQL procedure successfully completed.
sql>select * from test_copy;
BLOB_ID B
1 7 -
Copying Long Raw Column Data to another table
hi everyone,
i am trying to Copy Long Raw Column Data to another table in the same schema. this is the situation
Table A (col1 number,col2 long raw) with 100 records
Table B (col1 number,col2 long raw) with 0 records
now i want to copy col2 of the table A into the column 2 of the table B. but long raw data cant be retrieved in a select statement so is there any specific procedure that will copy long raw data or there is any simple way.
i will be really grateful for anybody's help.
thanx
shakeelDust off that old SQL*PLUS command "COPY" ...
create table tablea (col1 number,col2 long raw)
insert into tablea values (1, testrawio.chartoraw('this is line one'));
insert into tablea values (2, testrawio.chartoraw('this is line two'));
insert into tablea values (3, testrawio.chartoraw('this is line three'));
create table tableb (col1 number,col2 long raw)
copy from scott/tiger@larry insert tableb (col1, col2) using select col1, col2 from tablea
Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
3 rows selected from scott@tiger.
3 rows inserted into TABLEB.
3 rows committed into TABLEB at DEFAULT HOST connection.
SQL>Now to prove it has worked :
begin
for lr in (select col1, col2 from tableb)
loop
dbms_output.put_line('col1 = '||lr.col1||
' and col2 contains long raw equivalent of '||testrawio.rawtochar(lr.col2));
end loop;
end;
col1 = 1 and col2 contains long raw equivalent of this is line one
col1 = 2 and col2 contains long raw equivalent of this is line two
col1 = 3 and col2 contains long raw equivalent of this is line three
PL/SQL procedure successfully completed.
SQL> Note : In order to load some test data and prove the method works I made use of a package called "testrawio" located at http://www.classicity.com/oracle/htdocs/forums/ClsyForumID125/7.html
AMM -
(v 5.5) I can no longer copy and paste from one layer to another.
I can no longer copy and paste from one layer to another in Illustrator (5.5). This started happening a few days ago. Restarting Illustrator and also my computer (Mac) didn't help. Any ideas?
To clarify: If I select an object in layer 1 using command/c or command/x then select layer 2 and press command/v the object gets pasted back into layer 1 instead of layer 2. I've tried everything I can think of and can't correct the problem.
Now the only way I can get an object from one layer to another is to drag it into another layer in the layers window. -
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 -
How can I copy cell formatting from one range to another?
How can I copy cell formatting from one range to another, including text fonts, colours, borders, etc., so that, for example, I can reuse a formatted reconciliation table again in different parts of a sheet?
Hi George,
Wayne found the Spinning Beachball of Death, and you will find it too.
Numbers is not good at handling large datasets. Might I suggest that you group your data into smaller sets (each month, perhaps?) and save each group in a separate Numbers document. Numbers will not link between documents, but you could have a summary Table within each document. Then comes the "clunky" bit of copying all those summary tables into a master document where you do the final processing of the data.
Regards,
Ian. -
Error while copying GL Accounts from One Client to another client
Hi,
We are trying to copy GL accounts created in one client to another client (Company Code is same in both the clients). First we executed FS15 (send) and a file was created on the server. With the help of BASIS team we checked that file and it contained the required values. However, when we are doing FS16 (receive) we are getting following OK messages:
File /usr/sap/DEV/SYS/global/FBISABC is being checked
Session 1 session name RFBISA20 : No terminations have been found
However, at the same time we are getting following error message:
File name FI_COPY_COMPANY_CODE_DATA_FOR_GENERAL_LEDGER_0X is unknown
Message no. SG001
Diagnosis
No entry was found in the conversion table for the logical file name FI_COPY_COMPANY_CODE_DATA_FOR_GENERAL_LEDGER_0X.
Procedure
Add an entry to the conversion table for the logical file name. Maintain the conversion table with the transaction SM30.
Can someone please advice is there something wrong that we are doing for copying GL accounts from one client to another client.
Thanks,
SanjayDear Sanjay,
Did you check the batch-input? SM35
It could have happend that there was a mistake in the batch-input data and that the destination file has not been written. If this has not been written it could not be found. (I.E. you tried to transport G/L Accounts with deletion flags but did activate the checkbox "Transfer deletion ****").
There is another point: Did you activate the box "Datei nur prüfen" (English: Check file only)? If this box is activated the programm will check if the batch-input-file will be written without mistakes but it will not write the file. Only if the checkbox is not activated the batch-input-file will be written. (the same with FS16).
Kind regards
Maike
Edited by: Maike Nemeyer on Dec 1, 2011 8:52 AM
Edited by: Maike Nemeyer on Dec 1, 2011 11:45 AM -
I want to move a list from one SharePoint site to another, within the same collection. I have created a template and included the content but the column that is selected to append changes to existing text, has not copied in all cases, although it has for
some items.
I have a limited knowledge so won't be able to implement any solutions that require the use of code.Hi,
According to your post, my understanding is that you wanted to copy a list from one site to another that has a column that appends changes to existing text.
I recommend to use the custom workflow activity Copy List Item Extended Activityto
copy list items and files cross site.
You can do this with codeless SharePoint Designer workflows as long as you can install the
Codeplex Custom SharePoint Designer Workflow Activities.
These activities are also built-in to SPD2010.
To install the custom activities, please follow the steps as below:
Download the solution file form
Useful Sharepoint Designer Custom Workflow Activities
Copy the wps file to the Disk C.
Open the SharePoint 2010 Management Shell.
Run the command: add spsolution c:\ dp.sharepoint.workflow.wsp
Open the Center Administration, click System Setting->Manage Farm Solution-> dp.sharepoint.workflow.wsp->Deploy to one or more Web Application.
Open the SharePoint designer, add action from Custom Actions.
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
How do I copy a photo from one folder to another one in Aperture
I'm old and feeble I cannot figure out how to copy a photo from one folder to another folder and my 13 year old grandson can't figure it out either, so I feel better about it
thanks
canonmickUm ... that doesn't seem ... like a useful workflow. When you say "folder" do you mean a Folder in Aperture (shown on the Library tab of the Inspector) or a folder in Finder? They are not at all the same thing.
Aperture is an image manager, with the requisite file management built-in. Finder is a file manager.
If you provide a full description of what are doing, and what you are trying to do, someone here can set your straight.
Fwiw, IME, the learning curve if very long and uphill, but gentle. What's unusual (esp. for Apple products) is that the landmass of Aperture is separated from the rest of your computer knowledge by a moat. What I mean is, the first leap is the hardest. After that, you'll be on firm ground, ready to explore. -
Copy Custom toolbar from one instance to another in Project server 2007
Hi,
I am currently using project server 2007. We have a number of instances in our Project server enivoronment. Is it possible to copy customized toolbar from one instance to another? If yes, how?
Thanks in advanceHi Khaldun,
As per my reply in your previous post, here is a link explaining how to use the organizer:
Http://blogs.msdn.com/b/project/archive/2010/10/22/tips-and-tricks-copy-custom-views-filters-tables-and-other-elements-to-other-projects.aspx?Redirected=true
Basically, just copy the toolbar from the global source instance into a blank project file. Then do the same operation from the blank file containing your toolbar into the destination global model, still using the organizer.
Hope this helps.
Guillaume Rouyre - MBA, MCP, MCTS -
How to Copy the PLD from one database to another
Dear Members,
i have designed the PLD for Purchase Order, i want to copy the particular PLD into another Database.
i tried to copy the PLD from one database to another through copy express.. i copied the PLD sucessfully. But the problem is,it copies all PLD's from one database to another. i want only the Purchaseorder PLD has to be copied in to another database.any body can help me in this regard.
With Regards,
G.shankar GaneshHi,
select * into A1 from RDOC where Author !='System'
select * into A2 from RITM where Doccode in (select Doccode from A1 )
select * from A1
select * from A2
sp_generate_inserts 'A1'
sp_generate_inserts 'A2'
you will get Insert scripts of A1 and A2 tables .After that You 'll Replace A1 to RDOC and A2 to RITM.
So that you can RUN this SQL srcipts any where (In any Database)
but First u have to run sp_generate_inserts Storeprocedure(from websites) .
drop table A1,A2 -
How can I copy GPS information from one image to another?
I bought a Canon S100 specifically for its GPs and movie capability. On a recent vacation, I used the S100 and a Nikon D300. In cases where images were taken with both cameras in approximately the same place, I would like to copy the GPS information from the S100 CR2 files to the D300 NEF files. Does anyone know how to do this or if there is any plugins that will do it?
The added benefit of using GeoSetter to copy the information from one photo to another, is that you can see where every already-tagged photo is on a Google map to make sure the location is actually correct. Sometimes the camera clock is off a few seconds or minutes and you can easily figure how what offset to use by watching where the existing photos show on the map.
Using the MS Pro Photo Tools to generate a track from the existing S100 photos and then using that track in GeoSetter to assign the rest, with interpolation enabled, seems like the best course of action if the S100 track information is no longer available.
When using an external program to Geotag images that are already in LR, to be safe you should first save all the metadata to XMP files in the folder you’re going to tag, then exit LR, then geotag the photos, then restart LR and read information from all the XMP files.
Another benefit of GeoSetter is that you can assign the locality information to the photos that already have just coordinates in them.
Maybe you are looking for
-
Report for Differences in Invoice Amount and PO Amount
Hello, Is there any standard report available in SAP to compare the differences in PO Amount andd Actual Invoiced Amount against that PO? Regards, Rohit Garg
-
An attempt to open a pdf file with Photoshop Elements (version 12) resulted in a pop generated by the Photoshop Editor stated "Impossible to execute this operation (opening file) because one of the specified colour is not managed". Is there any mean
-
Conversion from awt to Swing, colored list widget, and awt update() method
Now that my Interactive Color Wheel program/applet is in Swing, I guess I should continue my previous thread in here from the AWT forum ("list widget with different colors for each list item?"): * list widget with different colors for each list item?
-
Ternary Operator Question (with regex).
Hi, I was learning regex in java and wrote a program which tests a string to see if it is an email address. import javax.swing.*; public class IsEmailAddress public static void main(String[] args) String address = JOptionPane.showInput
-
We are attempting to convert our usage from Appleworks to Pages and have run into a problem. A document we converted has a font called Baker Signet in it. We could bold or italics to our heart's content. When we bring it into Pages we can only have p