SQL & PL/SQL :: Find Constraint Name From User Table - Illegal Use Of LONG Datatype

Apr 30, 2010

I want to find the constraint name from User_Constraints table using the following query:

Select * From User_Constraints Where Table_Name='CHARGECODE' and Constraint_Type='C' And Search_Condition = '"PERCENTAGE" IS NOT NULL';

Then it shows "ORA-00997: illegal use of LONG datatype" error.

Is there any way to compare with long type value.

View 11 Replies


ADVERTISEMENT

SQL & PL/SQL :: Find All Partition Names - Illegal Use Of LONG Datatype

Mar 5, 2012

I need to find all the partition names below or equal given value.

select
partition_name
from
user_tab_partitions
where
table_name = 'RB' and
HIGH_VALUE <= 1234

Above Query is giving error "ORA-00997: illegal use of LONG datatype"

Any other alternative ? (I know its because of LONG Datatype of HIGH_VALUE ) ...

View 9 Replies View Related

PL/SQL :: Illegal Use Of LONG Datatype

Aug 31, 2012

I've this problem:

create table t1 ( x long );
Table created.

create table t2 ( x long );
Table created.

insert into t1 values ( 'test long type' );
1 row created.

insert into t2 select * from t1;
                      *
ERROR at line 1:
ORA-00997: illegal use of LONG datatype

How can I issue this error, I need use also dblink with long type.

I do not want to use the copy command.

I know that you can solve this problem with a stored procedure or anonymous block.

View 8 Replies View Related

ORA-00997 / Illegal Use Of LONG Datatype

Aug 13, 2013

We also face the same in oracle 9i version. we tried to re-org some tables for performance issue.But our tables have long and long raw datatype. then we approached the traditional way i.e 1. Export tables.2.Truncate tables.3.import tables.(use ignore=y).4.check the index validation.5.gather stats. Above was successfully done in our production environment.but some application downtime is required. 

View 1 Replies View Related

Replication :: ORA-00997 / Illegal Use Of LONG Datatype

May 5, 2010

I've got a dblink between two Oracle databases. There are one view that I specify a join between four remote tables.

One of the tables does have a column defined as a long raw. I do not need that column; the query doesn´t make reference to it.However, when I specify the query, I get this error: ORA-00997; illegal use of LONG datatype.

"how can I accomplish this query, over a dblink, given that one table has a long raw that is not part of my query ?

View 1 Replies View Related

Application Express :: ORA-00997 / Illegal Use Of LONG Datatype

Jul 26, 2012

I am trying to copy structure of table through database link but getting an error while running the command :

SQL> create table TOAD_PLAN as select * from TOAD_PLAN_@db_link where 1=2;
create table TOAD_PLAN_TABLE as select * from TOAD_PLAN_TABLE@to_paceview where 1=2
*
ERROR at line 1:
ORA-00997: illegal use of LONG datatype

how can i create it through database link or through any other utility.

View 2 Replies View Related

SQL & PL/SQL :: Two Columns Can Have Long Datatype In Table?

Apr 27, 2010

I have question related to LONG datatype. Actually from google and get to know that one table can have only one LONG datatype when i searched for reason . i got these resons:-

With 9i (I believe) and later versions, Oracle deprecates using the long datatype in favor of the lob (clob, nclob and blog) datatypes. It is only supported for backward compatibility.

Restriction:- It can not be used in create type as an attribute of the defined type.

It can not be used in where conditions.

There can be no indexes on long columns.

Regular Expression are not possible.

long can not be returned from a stored function.

SQL can not call functions that have an attribute of type long.

And even more restrictions.

So I want to know that is only reason because of that Oracle doesn't allow us to make two Column or is there any strong reason which make it more logical Like storing of data in Row blocks or some thing else.

View 2 Replies View Related

Server Administration :: Long Data Type Illegal?

Dec 26, 2012

when I try comnd create table a as select * from b where 1=2; it says illegal datatype long..i m bemused what sin has the long datatype done?

View 4 Replies View Related

SQL & PL/SQL :: Find Constraint Name Of A Table

Dec 24, 2010

I want to know constraint name of a particular table if it exists.Here are the queries that i tried to find the constraint name of a particular table but the results were 'no rows selected'.

Queries:

select constraint_name from user_cons_columns where table_name='x';
select constraint_name from user_constraints where table_name='x';

View 5 Replies View Related

SQL & PL/SQL :: Long Datatype In Where Clause

Sep 1, 2010

Can we use long data type in where clause of the query ?

View 2 Replies View Related

PL/SQL :: How To Set The Default Long Datatype

Jul 12, 2013

Query that I want to run: 

exec DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES', false);

 result:  E;;45;45 ;45 ;45 ;S 45 

I am not sure but may be I need to set long size before running above query. But when I try to set long size gives below error. "The output from DBMS_METADATA.GET_DDL is a LONG datatype. When using SQL*Plus, your output may be truncated by default. Issue the following SQL*Plus command before issuing the

DBMS_METADATA.GET_DDL statement to ensure that your output is not truncated:"SQL> SET LONG 9999error: Unhandled SET statement:  "SET LONG 9999"

View 5 Replies View Related

SQL & PL/SQL :: Convert From LONG To BLOB Datatype?

Feb 1, 2012

I have a source data in a column with LONG datatype. I want to insert that data into a separate table in a column which has BLOB datatype.

View 9 Replies View Related

Find Details Of User Who Modified Structure Of Table?

Aug 3, 2011

I have a small question is it possible to find the details of a user who modified the structure of a table, including what command he ran to change the structure of the table?

View 2 Replies View Related

Performance Tuning :: Find The Last User Analyzed Particular Table?

Aug 9, 2012

How can i find the last user analyzed particular table?

I can able to find last analyzed date, but can't able find the which user has done it.

View 2 Replies View Related

Get Table Name / Constraint Name / Constraint Type With Join Processes In String Type

Dec 25, 2007

i want to get table name, constraint name, constraint type with join processes in string type. this is what i want: alter table tablename add constraint constraintname constrainttype(columnname)

View 1 Replies View Related

SQL & PL/SQL :: View User Who Is Running Long Queries

Nov 23, 2011

An user is running some queries and that's making database hang. I want to view what queries this user is running. Can this be done by session auditing turning on?

View 13 Replies View Related

SQL & PL/SQL :: Primary Constraint On Table Affecting Procedure To Insert Rest Of Rows In Table?

Jun 12, 2012

primary key constraint on transaction_dtl_bk is affecting the insertion of next correct rows.

CREATE OR REPLACE PROCEDURE NP_DB.san_po_nt_wnpg_1 (
dt DATE
)
IS
v_sql_error VARCHAR2 (100); -- added by sanjiv
v_sqlcode VARCHAR2 (100); ---- added by sanjiv added by sanjiv

[code]...

View 2 Replies View Related

PL/SQL :: Conversion Of BLOB Datatype To CLOB Datatype

Aug 17, 2012

I would need to convert the column datatype from BLOB to CLOB. currently in the table, the BLOB column has the data. the requirement is to convert this column from BLOB to CLOB datatype.

How to convert from BLOB datatype to CLOB datatype ?

View 10 Replies View Related

Semantic Technologies :: Can Bind LONG Value Only For Insert Into LONG Column

Dec 22, 2012

I got an exception when I was using sesame adapter to dump a turtle file which contains long texts as objects into oracle semantic database. The exception information is:

org.openrdf.repository.RepositoryException: org.openrdf.sail.SailException: java.sql.SQLException: ORA-01461: can bind a LONG value only for insert into a LONG column

ORA-06512: in "SF.ORACLE_ORARDF_ADDHELPER", line 1
ORA-06512: in line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802) ...

View 1 Replies View Related

ORA-01461 - Can Bind LONG Value Only For Insert Into LONG Column

Sep 26, 2012

resolve problem with move lob objects ? I move table partition and lob (BLOB) from one tablespace to another :

alter table EBIF.APO_T_VER_DISP_ACC_RESP MOVE PARTITION P1M20120901 LOB(SIGNATURE_PATTERN) STORE AS (TABLESPACE tmp) t
able EBIF.APO_T_VER_DISP_ACC_RESP MOVE PARTITION have : pbeb_ap1.SYS>select partition_name , tablespace_name from dba_lob_partitions where table_name='APO_T_VER_DISP_ACC_RESP';

PARTITION_NAME          |TABLESPACE_NAME
------------------------------|------------------------------
P1M20110901          |TD1M20110901
P1M20111001          |TMP
P1M20111101          |TMP
P1M20111201          |TMP
P1M20120101          |TD1M20120101
[code]....

I used skrip to generate move :

select 'alter table '||table_owner||'.'||table_name||' MOVE PARTITION '||partition_name||' LOB('||COLUMN_NAME||') STORE AS (TABLESPACE TD_PART_RW) PARALLEL 4;'

from dba_lob_partitions where tablespace_name='TMP';

when I started loadink into dis table I get : ORA-01461: can bind a LONG value only for insert into a LONG column

when I recreate this table ALL work ok , but new table is not partitioned .

View 2 Replies View Related

Update Statement Which Updates User IDs In One Table With User IDs In Another Table?

Jun 17, 2009

I am trying to write an update statement which updates the User IDs in one table with the User IDs in another table. However I need to update statement to ignore any duplicates that are in the tables.

View 4 Replies View Related

Updating A Table Column Which Is XML Datatype

Nov 1, 2011

I am updating a table column which is xml datatype and am getting above error.Below is the process what i did. since the xml is too large i split them into small chunks.

DECLARE
conditionXML CLOB;
ls_xml_2 Clob;
ls_xml_3 clob;
ls_xml_4 Clob;
ls_xml_5 Clob;
ls_xml_6 clob;
ls_xml_7 Clob;
[code]...

View 1 Replies View Related

PL/SQL :: Creating Table With Boolean As Datatype

Dec 1, 2012

I'm trying to create a table 'a' with column name as 'flag' and datatype as 'boolean' ie. create table a(flag boolean);

is it possible in sql or pl/sql in oracle?

If its possible to create a table and also let me now inserting row and what boolean should return.

View 1 Replies View Related

Datatype Of Column Of A Table In Oracle Or SQL

Aug 6, 2013

a) What if i want to find out the  Datatype of a specific column in the Table. 
b) How do i find the Column Datatypes?

View 3 Replies View Related

Creating Table With A Constraint?

Oct 16, 2006

how to i insert a constraint of words into the table example below.I am new to this stuff man.

Create table Orders
(
orderID Number(8) Primary Key,
orderDate Date Not Null,
methPmt Varchar2(10),
custID Number(5),
orderSource Number(2),
Foreign Key(custID) Reference Customer(custID),
Foreign Key(ordersource) Reference OrderSource(ordersource)
);

The catch is I am required to enter a constraint of the methPmt will only take values of "CASH", "CREDIT" or "CHEQUE" only.

How am I suppose to enter this constraint value into the creation of this table?

View 3 Replies View Related

Datatype Modification For Table With Huge Data

Aug 11, 2011

Below is my requirement.

Need to change the precision of a column in a existing table. Statistics about the table

* has over 130 columns
* More than 300 million records
* Column to modify is #121 which has data
* No primary key defined

Since the column has data, it is not possible to modify with a simple Alter.

Second option - create temp column in same table, update from original, put null in original, alter, update back from temp, drop the temp column. This approach is very expensive and time consuming.

Also the Column ID needs to preserved as #121.

View 3 Replies View Related

SQL & PL/SQL :: Table Column Datatype With %type Attribute

Jun 23, 2011

Is it possible to replace datatype of column of one table with another table's column datatype using %type like below

SQL>create table test1 (v1 varchar2(10));

SQL>create table test2 (v1 test1.v1%type);

View 3 Replies View Related

SQL & PL/SQL :: Load Xml File Into Table Having Xmltype Datatype?

Jul 4, 2013

I'm trying to load xml file into table having xmltype datatype, but it is throwing below given error.I even tried to load data by changing '&' into '&' but still getting same error.

Error at line 6
ORA-06512: at "SYS.XMLTYPE", line 296
ORA-06512: at line 1
31011. 00000 - "XML parsing failed"
*Cause: XML parser returned an error while trying to parse the document.
*Action: Check if the document to be parsed is valid.

Version : ORACLE 11g, Windows 7

CREATE TABLE xml_test
(
id NUMBER(5),
NAME VARCHAR2(50),
xmldata xmltype
);
INSERT INTO xml_test(id, name, xmldata) VALUES(1,'file1', XMLTYPE(bfilename('SCOTTDIR', 'TEST_XML.XML'), nls_charset_id('AL32UTF8')));

TEST_XML.XML file content:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- excelFolder:"c:CSD'TEST.XSL" -->
<File1>
<Version>1.6.1</Version>
<FileSource>Java&Conversion 1.2</FileSource>
<FileDateTime>2013-06-13T15:55:54</FileDateTime>
<Filecreatedby>Lo&ki</Filecreatedby>
<FileLocation>Bangalore</FileLocation>
</File1>

insert xmlfile having '&' data into xmltype column.

View 4 Replies View Related

PL/SQL :: Created A Table With CLOB As Datatype For One Of Columns

Aug 5, 2013

<ORACLE VERSION : 11.2.0.2.0> i have created a table with CLOB as datatype for one of the columns, I am trying to store a string ( I am not sure about the length of the string) , when i am querying on my table for the CLOB column,instead of the actual string "(HUGECLOB)" is coming. How to get the actual string in case the problem is with the SIZE.

View 1 Replies View Related

PL/SQL :: Search Of Table Names By Column Datatype

Apr 28, 2013

I have a requirement that i should list out all the table names which are all using timestamp datatype in a specified schema. Is there any way to find those table names by using any system tables.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved