Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to SELECT LONGRAW column from a table (With Oracle 8)

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have ORA-00932 error when I execute the query
 
Hi,

00932 is the inconsistent datatype error. Where are you executing the query?
Is it within a PL/SQL block that is trying to cast the raw value to a different
type?

Bob Bob Lowell
ljspop@yahoo.com

 
You are probably running into one of the severe limitations on the long datatype. You can't use character functions like SUBSTR with this datatype, so a lot of developers tend to avoid them.
 
Thank u Bob for your quick answer!

In fact, I execute the query in a simple SQL statement and I dont' know how to cast the LONGRAW type to char or varchar:
MYTABLE contains two columns : USERID, varchar2 type and PKI longraw type
And I need to retrieve both these fields and store them in another table (with the same structure) located in other Database.
And My Query is simply SELECT * FROM MYTABLE

 
SELECT * FROM MYTABLE; should work if you are running it as a stand alone query. However it won't work if you are doing something like

CREATE TABLE COPY_TABLE AS
SELECT * FROM MYTABLE;
 
Hi,

Yeah, this is a pain. As Karluk mentions you can't do a Create
table as select... type statement with longs. You might try
exporting the original table. Renaming the original table to the
new table name you want, than import the original table with the
original name. Of course that might not be an option on a production
system, and if there are constraints and indexes involved you'll
have to account for them. But that's just one suggestion, there
are lots of ways to skin a cat.

Good luck,

Bob Bob Lowell
ljspop@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top