Illegal use of LONG
I create on table say "TAB" with a column as long datatype
create table tab
(name long);
now i need to create another table structure similar to "TAB" say "TMP_TAB"
create table tmp_tab
as
select * from tab;
But this gives the following error..< ORA-00997: illegal use of LONG datatype >
Can anyone please explain me the reason for the following error?
If you have Oracle 9i, then
Quick and correct solution: Don't use LONG - Datattype !
It's obsolete, use CLOB instead.
If LONG- Datatype is inevitable (why ?), then
declare
v_sql VARCHAR2(32767);
begin
select dbms_metadata.get_ddl('TABLE', 'TAB', 'SCOTT') INTO v_sql
from dual;
v_sql := replace (v_sql, '"SCOTT"."TAB"', '"SCOTT"."TMP_TAB"');
execute immediate v_sql;
end;
/but it's a bit tricky ....
Similar Messages
-
While I was insert a rows into the same table I am getting an error. I am having one long column in table list. I am getting following error while I was inserting a row.
ORA-00997: illegal use of LONG datatype
Please let me know how do I insert long data type values for this kind of insert.[duplicate thread|http://forums.oracle.com/forums/message.jspa?messageID=3770321#3770321]
-
Illegal use of LONG datatype error message when i create materialized view
Hello to all
I want create read only materialized view replication environment two of our tables have LONG datatype when i create materialized view against on them
I recieve this error message
CREATE MATERIALIZED VIEW MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID AS SELECT * FROM MDB.TOAD_PLAN_TABLE@arahisto
Error report:
SQL Error: ORA-00997: illegal use of LONG datatype
00997. 00000 - "illegal use of LONG datatype"
Do you know any resort solution for it?
thanksYou can not use longs in materialized views over a database link, you can however take a part of a long over to a materialized view.
I have gotten this to work in the past l had to create a PL/SQL function that you can use to extract the character data from the long column and use that to
as part of the function you will need to pass in the columns of the table that will identify the unique records so you can pick out the long column
example function
-- you will need to make sure this funtion is in the remote location as you can not select longs accross a DB LINK.
CREATE OR REPLACE FUNCTION MDB.TOAD_PLAN_LONG_CONV
(pass in the primary key columns for the table)
RETURN VARCHAR2
IS
v_long VARCHAR2(32767) ;
BEGIN
BEGIN
-- need to select the long column into the PL/SQL variable
SELECT long_column
INTO v_long
FROM MDB.TOAD_PLAN_TABLE
WHERE key_columns = passed columns ;
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE = '-01406' THEN
NULL ;
ELSE
RAISE ;
END IF ;
END ;
RETURN SUBSTR(v_long,1,4000) ;
END ;
Then when you create the materialized view utilize that function on the long column.
create or replace materialized view MDB.TOAD_PLAN_TABLE TABLESPACE aramis REFRESH FORCE WITH ROWID
AS
SELECT column1, .... columnx,
MDB.TOAD_PLAN_LONG_CONV@arahisto (primary key column list) as long_column_name
FROM MDB.TOAD_PLAN_TABLE@arahisto ;
See if this will work for you? Keep in mind however this solution will not get the entire long column only as much as a PL/SQL variable will hold of it.
Mike -
ORA-00997: illegal use of LONG datatype - while inserting a record
Hello,
I have this table:
create table TEST
USER VARCHAR2(20) not null,
WINCFG LONG RAW
There are a few records, some with user='OLDUSER'.
I want to add new records with a statement like this one:
insert into TEST
select 'NEWUSER',wincfg from TEST where user='OLDUSER'
But Oracle returns the error:
"ORA-00997: illegal use of LONG datatype"
I have no idea...
Thank youSQL> insert into TEST
2 (
3 select 'NEWUSER',wincfg from TEST where user='OLDUSER'
4 );
select 'NEWUSER',wincfg from TEST where user='OLDUSER'
ERROR at line 3:
ORA-00997: illegal use of LONG datatype
SQL> copy from scott/tiger@mydb insert test using select * from test;
Array fetch/bind size is 15. (arraysize is 15)
Will commit when done. (copycommit is 0)
Maximum long size is 80. (long is 80)
1 rows selected from scott@mydb.
1 rows inserted into TEST.
1 rows committed into TEST at DEFAULT HOST connection.Hope it help -
ORA-00997 - Illegal use os LONG Datatype
Hello
I'm having this error in my query, and I know I can't use one column LONG with a INSERT statement, but I can't change this column to VARCHAR2(4000) because of the short space.
Somebody have the solution for this? Or how I make this insert? Some function or procedure... anything...
Tnks
RafaelSince you cannot use LONG into a INSERT...SELECT... statement, you may use a procedure with a loop.
By the way, what about CLOB ?
Nicolas. -
ORA - 00997 Illegal Use Of Long Datatype when no Long is used
I have a query that was working fine for years. We have upgraded to 10.2.0.5 on a test instance and we now get this error.
The view in the FROM clause is an org specific view on xxc_affi_relation_headers_all. All of the fields in the view and underlying table are either VARCHAR2, NUMBER, or DATE.
I have simplified the query to one that still gives the error.
The query is:
SELECT *
FROM xxc_affi_relation_headers xarh
WHERE xarh.affi_relation_id = (select xarh.affi_relation_id
from xxc_affi_relation_headers xarh
where xarh.execute_vendor_id = 125
connect by prior xarh.affi_relation_id = xarh.parent_relation_id
start with xarh.affi_relation_id = 214
If I run the sub query by itself, as below, there is no error and the result is 214.
select xarh.affi_relation_id
from xxc_affi_relation_headers xarh
where xarh.execute_vendor_id = 125
connect by prior xarh.affi_relation_id = xarh.parent_relation_id
start with xarh.affi_relation_id = 214
If I run the main query and replace the sub query with 214, as below, thre is no error.
Is there something that would cause an implicit conversion to a LONG datatype in this query? I am not able to find a reason for this error message that fits the query.
The original query that caused the error was:
SELECT xarh.affi_relation_id
FROM
xxc_affi_relation_headers xarh
WHERE NOT EXISTS (SELECT 1 FROM xxc_oe_order_line_dist xold
WHERE xold.line_id = p_line_id AND xold.dist_type = 'I'
AND xold.affi_relation_id = xarh.affi_relation_id)-- 1704
AND v_creation_date
BETWEEN NVL(xarh.start_date,v_creation_date-1) AND NVL(xarh.end_date,v_creation_date+1) --ES fix not a valid month
AND xarh.sale_segment1 = (SELECT gcco.segment1 --RT 9631
FROM oe_transaction_types_all otty, ra_cust_trx_types_all rctt, gl_code_combinations gcco
WHERE otty.transaction_type_id = p_order_type_id
AND otty.cust_trx_type_id = rctt.cust_trx_type_id
AND rctt.gl_id_rev = gcco.code_combination_id )
AND EXISTS(SELECT 1 FROM xxc_affi_relation_lines xarl WHERE xarl.affi_relation_id = xarh.affi_relation_id
AND NVL(xarl.element_value,v_item_type) = v_item_type)
connect by prior xarh.parent_relation_id = xarh.affi_relation_id
Start with
xarh.affi_relation_id = (select xarh.affi_relation_id
from xxc_affi_relation_headers xarh
where xarh.execute_vendor_id = p_vendor_id
AND xarh.affi_relation_id != p_parent_relation_id
AND NOT EXISTS (SELECT 1 FROM xxc_affi_relation_headers xarh2
WHERE xarh2.parent_relation_id = xarh.affi_relation_id)
AND v_creation_date BETWEEN NVL(xarh.start_date,v_creation_date-1) AND NVL(xarh.end_date,v_creation_date+1)--ES fix not a valid month
start with xarh.affi_relation_id = p_parent_relation_id
connect by prior xarh.affi_relation_id = xarh.parent_relation_id)
--ORDER BY NVL(parent_relation_id,-1), NVL2(xarl.element_value,1,2)
;Its a bug
See this Oracle Document
Bug 9726739 - ORA-997 from SQL with CONNECT BY and UNION [ID 9726739.8]
Best Regards
mseberg -
I want to *use* very long file and path names!
This is really a plea to Microsoft...
There are several threads about copying or deleting files where the path and/or file name is too long.
Most have explanations of why this problem occurs. (depending on Windows version and application, the total length [fully qualified file name; i.e. C:\this-dir\that-dir\somefile.xyz] is limited to a maximum of 260 or fewer characters). This limit
But I *WANT* to be able to use very long file names and paths!
I can understand Microsoft keeping this limit - even while allowing UNICODE paths and file names up to 32k characters - because many existing tools will be unable to handle the longer names. This would probably yield a lot of questions/flames about
them "breaking the software I've used for years."
But it would be possible to have a system setting to optionally allow the long names. Since I'd have to manually set it, I'd know I'm potentially breaking existing software.
In my case, I'm backing up various file directories where some files are very long. With the server-side additional paths (e.g., client-name\project-name\backup-date\...") I occasionally hit files that can't be copied. Renaming is not suitable;
sometimes names have to match other file names.
I can zip them, create iso files, use a backup program that creates a blob, put them in a source-control system, etc - but I really don't *want* to do that; it's very convenient to have a direct copy of the directories. Each of these 'solutions' either
requires extra work (which could be scripted, so ok...) or doesn't work with the work-flow for some reason.
Microsoft, *please* fix this in Windows 8! (if not before...) This limit has existed for far too long!
And readers - please don't just repeat what's in the other threads (rename/use subst/map directory/etc) or flame without useful information. Thanks!Hi,
I would submit your opinion to our Product Team. If you have another feedback, please feel free and let me know. Or you could follow TekDozer’s advice to submit
by yourself.
Thank you for your understanding and cooperation.
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” -
Revision: 16385
Revision: 16385
Author: [email protected]
Date: 2010-06-01 13:32:35 -0700 (Tue, 01 Jun 2010)
Log Message:
-removed the utilities package target since it's not used any longer - at least what is contained in this target. I believe this was a leftover from flex 2 days.
-fix up the packaging targets to ensure they are being properly built. I removed depends="temp-clean" and inserted antcall target="temp-clean" because a target gets executed only once, even when more than one target depends on it.
QE notes:
Doc notes: no
Bugs: no
Reviewer: Guarav
Tests run: no
Is noteworthy for integration: no
Modified Paths:
flex/sdk/trunk/build.xmlhttp://blogs.adobe.com/jkost/2014/06/installing-the-2014-release-of-creative-cloud.html
-This messages says (at least some) CC 2014 programs use NEW plugins https://forums.adobe.com/thread/1499663
-so do not uninstall the older CC programs if you use plugins in your programs until you are sure you have plugins that work in CC2014
If you are sure you don't need the old CC programs
-http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall -
Use of long text in maintenance item
Hi Experts ,
What is use of long text in maintenance item, Which T code is use for to create long text for maintenance item
With best regards,
AVI DDS.hi
if you have maintained the tasklist ,i think it will copy the maintenance item short and long text to the maintenance order or notification created
regards
thyagarajan -
I need to clarify how I can use adobe as a host for my site for free. I see where business catalyst is supposed to be temporary as well as it is recommended to use as the better alternative to launch my muse site. But then I have to use the long extension of "businesscatalyst" in addition to the domain name I'd prefer. How exactly can I take it live? do I have to use a third party hosting?
Hi,
Once you are done with your sitet, Click on Publish in Muse, select New Site from the drop down, It will ask you a name for your site, which will be used for site url, you will get a url like mysite.businesscatalyst.com, then go to the browser and login to the admin panel, mysite.businesscatalyst.com/admin and on Dashboard, click Launch site. This will push your site live, and you can then add your custom domain.
Also make sure that you have completed all these actions mentioned here
User manual
Do let me know if you have any question. -
Post Moved Illegal use of my broadband
Post moved http://community.bt.com/t5/Other-BB-Queries/Illegal-use-of-my-broadband/td-p/606892
If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’DS wrote:
Andy_N wrote:
DS wrote:
pottyperson wrote:
I doubt that other contributors will be able to offer a solution
Well, as I mentioned before, if it's a HH2 and the rear of it is in view of the public, then every Thomas, Richard and Harry will be able to see the wireless key and make full use of the Internet.
Hi.
Although possible, that's not entirely true. If the user has altered the wireless key, then viewing the back of the hub will not help
But how many out there in BT land actually do change it?
BT only prompt the user to change the default admin password if and when they first access the hub.
At least BT thought about the label design on the HH3, keeping it hidden until needed.
I reckon hardly anyone would change the wireless key to be honest , but I wonder how many leave them in a window ...
http://www.andyweb.co.uk/shortcuts
http://www.andyweb.co.uk/pictures -
Error: Illegal use of when -style tag without choose as its direct paren
Hi,
I'm using the Code:
<c:choose>
<c:when test="${empty param.usernaseme}" >
<B>Hello <c:out value="${param.usernaseme}" /></B>
</c:when>
<c:otherwise>
unknown user name.
</c:otherwise>
</c:choose>
and keep geting the Error:
Illegal use of <when>-style tag without <choose> as its direct parent
As far as know
the code is OK.
Declare Is OK (Other thigs using <c:out /> working)
thanks for your halp
ShimonHi,
I'm using the Code:
<c:choose>
<c:when test="${empty param.usernaseme}" >
<B>Hello <c:out value="${param.usernaseme}" /></B>
</c:when>
<c:otherwise>
unknown user name.
</c:otherwise>
</c:choose>
and keep geting the Error:
Illegal use of <when>-style tag without <choose> as its direct parent
As far as know
the code is OK.
Declare Is OK (Other thigs using <c:out /> working)
thanks for your halp
Shimon -
Illegal use of nonvirtual function call
I'm trying to run this program....
import java.io.*;
import java.util.*;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import sun.net.nntp.*;
import lotus.domino.*;
public class WriteNewsFile implements Constants{
private Store store;
private Database db;
public Store createNNTPConnection(String host, String protocol) throws Exception{
// Create empty properties
Properties props = new Properties();
// Get session
javax.mail.Session session = javax.mail.Session.getInstance(props, null);
// Get the store
Store store = session.getStore(protocol);
store.connect(host, null, null);
return store;
public Vector getForumNames(String root) throws Exception {
Vector result = new Vector();
NntpClient nc = new NntpClient(NNTP_HOST);
String line;
nc.serverOutput.println(NNTP_COMMAND_LIST_ACTIVE);
BufferedReader br = new BufferedReader(new InputStreamReader(nc.serverInput));
while ((line = br.readLine()) != null) {
if (line.equals("."))
break;
if (line.startsWith(root)) {
result.add(line.substring(0, line.indexOf(" ")));
nc.closeServer();
return result;
private void init(String root) throws Exception {
Vector forums = getForumNames(root);
for (Enumeration e = forums.elements(); e.hasMoreElements();) {
System.out.println(readWriteNewsgroup((String)e.nextElement()));
System.gc();
public static void main(String args[]) {
WriteNewsFile wns = new WriteNewsFile();
try{
wns.db = wns.openNotesDB(DOMINO_HOST, DOMINO_USER, DOMINO_PASSWD,
DOMINO_DB);
wns.store = wns.createNNTPConnection(NNTP_HOST, NNTP);
//wns.init("forums.software.");
wns.init("forums.hardware.");
//wns.init("forums.services.");
wns.store.close();
}catch(Exception e){
e.printStackTrace();
* Insert the method's description here.
* Creation date: (12/10/2001 9:51:20 AM)
* @param s java.lang.String
public Database openNotesDB(String host, String user, String passwd, String dbName) throws
NotesException {
lotus.domino.Session session =
NotesFactory.createSession(host, user, passwd);
db = session.getDatabase(session.getServerName(), dbName);
if (db == null)
throw new NotesException();
else
return db;
public String readWriteNewsgroup(String newsgroup) throws Exception {
// Get folder
Folder folder = store.getFolder(newsgroup);
folder.open(Folder.READ_ONLY);
// Get directory
Message messages[] = folder.getMessages();
for (int i = 0, n = messages.length; i < n; i++) {
//System.out.println( i + ": " + messages.getFrom()[0] + "\t" +
messages[i].getSubject());
Document doc = db.createDocument();
doc.replaceItemValue(MESSAGE_NUMBER,new Integer(messages[i].getMessageNumber()));
doc.replaceItemValue(MESSAGE_ID, messages[i].getHeader(MESSAGE_ID)[0]);
doc.replaceItemValue(DATE, messages[i].getReceivedDate());
doc.replaceItemValue(FROM, messages[i].getFrom()[0].toString());
doc.replaceItemValue(SUBJECT, messages[i].getSubject());
doc.replaceItemValue(NEWSGROUPS, messages[i].getHeader(NEWSGROUPS)[0]);
doc.replaceItemValue(ORGANIZATION, messages[i].getHeader(ORGANIZATION)[0]);
RichTextItem rtitem = doc.createRichTextItem(BODY);
try{
rtitem.appendText(messages[i].getContent().toString());
}catch(UnsupportedEncodingException e){
System.out.println("Could not convert body to String");
//rtitem.recycle();
if (!doc.save())
System.out.println("Did not save the document");
// Close connections and files
folder.close(false);
return newsgroup;
but getting this runtime error.....
C:\$user\java>java WriteNewsFile
Exception in thread "main" java.lang.VerifyError: (class: com/ibm/CORBA/iiop/Gen
ericServerSC, method: dispatch signature: (Lcom/ibm/CORBA/iiop/IIOPInputStream;L
com/ibm/CORBA/iiop/IIOPOutputStream;)V) Illegal use of nonvirtual function call
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java:134)
at com.ibm.CORBA.iiop.ORB.registerSubcontracts(ORB.java)
at com.ibm.CORBA.iiop.ORB.<init>(ORB.java)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:254)
at org.omg.CORBA.ORB.create_impl(ORB.java:306)
at org.omg.CORBA.ORB.init(ORB.java:355)
at lotus.domino.cso.Session.OREFtoSession(Session.java:703)
at lotus.domino.cso.Session.<init>(Session.java:57)
at lotus.domino.cso.Session.createSession(Session.java:36)
at lotus.domino.NotesFactory.createSession(NotesFactory.java:67)
at WriteNewsFile.openNotesDB(WriteNewsFile.java:88)
at WriteNewsFile.main(WriteNewsFile.java:66)
and don't understand the nature of the error...... Can anyone help or direct me to some information that might help me understand?
Thanks,
Heatheryou have used a method that was implemented in JRE1.2 -- IE's native JVM 1.1.4 or 1.1.5 . You can do one of two things:
1) convert your html file to make it use a new Java plug-in, or
2) change your code to call a comparble method that is available before 1.2
V.V. -
Illegal use of keyword "SELECT"...
Hi,
I am new to TimesTen and using version 11.2 with Hibernate.
I get the following error while running my application--
*01 Feb 2011 12:03:29,201 [WARN] org.hibernate.util.JDBCExceptionReporter: SQL Error: 7025, SQLState: 37000*
*01 Feb 2011 12:03:29,201 [ERROR] org.hibernate.util.JDBCExceptionReporter: [TimesTen][TimesTen 11.2.1.7.0 ODBC Driver][TimesTen]TT7025: Illegal use of reserved keyword "SELECT", character position: 459 -- file "ptSqlY.y", lineno 8158, procedure "reserved_word_or_syntax_error"*
Would really appreciate some help as tyo how to fix this problem.I've spoken to various folks today about this. I'm not a Hibernate / TT dialect expert by any means. However, this SQL is a (sort of) documented restriction in TimesTen. This usage of SELECT is a 'derived table' and, unlike Oracle and many other databases, TimesTen currently only supports these in the FROM clause but not in other places such as, here, a projection list.
So, it's not a bug but a limitation of our current SQL implementation.
With regards to where it's coming from, based on the info that is provided, we think that the source of this SQL error is not directly from Hibernate or from the Hibernate dialect class that the application uses. We think this scalar subquery in the select list is defined in a Hibernate mapping document as something called a derived property.
In Hibernate, Java object fields are usually mapped to table columns using a property element within the hibernate-mapping element like this:
<hibernate-mapping>
<class name="com.timesten.tptbmas.Tptbm" table="TPTBM">
<composite-id name="key" class="com.timesten.tptbmas.TptbmPKey">
<key-property name="vpn_id" column="vpn_id" />
<key-property name="vpn_nb" column="vpn_nb"/>
</composite-id>
<property name="directory_nb" column="directory_nb"/>
<property name="last_calling_party" column="last_calling_party"/>
<property name="descr" column="descr"/>
</class>
</hibernate-mapping>
This is the usual case, however, it is also possible to map Java object fields to 'derived' values from the database table. These 'derived' values are expressions in the select list instead of simple column references.
A 'derived' property is defined in the property element using the 'formula' attribute.
For example:
<property name="descr" formula="'VPN ' || TO_CHAR (VPN_ID) || ' extension ' || TO_CHAR (VPN_NB)"/>
The value of 'formula' is any valid SQL expression that can appear in the select list.
Our belief is that you are defining a scalar subquery for 'formula'. For example:
<property name="descr" formula="(SELECT COUNT (*) FROM DUAL)"/>
And this generates the error when executed against TimesTen.
The solution is to rewrite 'formula' using a select list expressions that TimesTen supports - or change things to avoid the need for a derived property in the select list.
If this doesn't solve it, it's probably best to log an SR so we can obtain various files from you that we would need to look into it further. -
Lightroom 4 resizing on export feature - using the "long edge" resize option - doesn't seem to work
In previous versions of Lightroom (prior to 4), when I used the resize feature while exporting, I often used the "long edge" value to resize.
Previously, when I selected 2500 as the "long edge" value, I would receive exported JPGs in a size of something like 2500x1650 or so for landscape shots and 1650x2500 for portrait shots.
With LR 4 (not sure if this started with the RCs or 4.0), using the same settings, I'm getting landscape shots that are 3700x2500 and portrait shots that are 1650x2500. This is acting more like I said I wanted a dimensional resize of _____ X 2500 instead of long edge of 2500.
I tried playing around with some of these settings, but nothing seems to give me the old behavior of 2500 on the long edge, even though that's what I've set it for.
Anyone else seen this type of issue?
I'm currently running LR 4 RC2, but also noticed this on RC1, but not sure of 4.0. I'm a Mac user, running the current version of Lion (10.7.3) on a 2010 Mac Pro.
Thanks,
MarkWith RC2 on Windows 7 (64 Bit) I get 2500x1667 for landscape and 1667x2500 for portrait, as expected. Seems to be an issue in the Mac version only.
A workaround might be to use "dimensions" instead and leave one of the fields empty (LR inserts "0" there, but one cannot enter "0" manually). I think this is equivalent to "long edge", but I am not 100% sure (edit: ok, I think I am nearly sure that it is).
Maybe you are looking for
-
facetime stops working after installing mavericks. After login it says: check internet connection and try again. My internet connections are ok, I have both wifi and lan.
-
I am attempting ReWire to Plogue Bidule but Mainstage 2.2 goes into SWOD on starting Bidule, which correctly starts in ReWire mode. Here is the process sample. Appreciate if anyone could help: Sampling process 395 for 3 seconds with 1 millisecond of
-
Hello all, I have two internal tables for PO line items: 1) POitems that contains data like POdoc number, POline number, MATNR, MATDESC, QTTY, AMOUNT Etc. 2) POTexts that contains PO Texts. I want to print the data in the form in this format: Matnr
-
G/L account postings control in Accounting document
Dear All, We have a scenario, where Business are using different materials for special charges. For these materials business decided to go with Credit and Debit memo process. Globally Business is using same Billing type CR/DR. anotherr information is
-
Swatch library suddenly disappeared and doesn't recognize to reload
I was working on a file as normal and noticed that in a matter of a few minutes, the swatches I had all disappeared. Had left me with none. Rebooted system, didn't help. When I go to reload swatches, it doesn't recognize any of the libraries. HELP!