How to know exact column name in following error (oracle9i)
Hi all,
Please telll me
How to know exact column name in following error
ORA-01401: inserted value too large for column
Prashant
null
If you are running this in your SQL*Plus session then you can easily check it out --
satyaki>
satyaki>create table test_sat
2 as
3 select empno,ename,job
4 from emp;
Table created.
satyaki>
satyaki>
satyaki>desc test_sat;
Name Null? Type
EMPNO NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
satyaki>
satyaki>
satyaki>
satyaki>
satyaki>insert into test_sat values(5555,'Robin','BU');
1 row created.
satyaki>
satyaki>
satyaki>insert into test_sat values(5555,'Arama Baager Taaja','FR');
insert into test_sat values(5555,'Arama Baager Taaja','FR')
ERROR at line 1:
ORA-01401: inserted value too large for column
satyaki>insert into test_sat values(55557,'Arama','FR');
insert into test_sat values(55557,'Arama','FR')
ERROR at line 1:
ORA-01438: value larger than specified precision allows for this column
satyaki>
satyaki>insert into test_sat values(5555,'Arama','ACCOUNTING');
insert into test_sat values(5555,'Arama','ACCOUNTING')
ERROR at line 1:
ORA-01401: inserted value too large for column
satyaki>Regards.
Satyaki De.
Similar Messages
-
How to know the column name using the index name for a particular table
Hi All,
I have small query regarding, I have index name and table name so by using this how can I know the column name associated with that index of that particular table specific to Oracle9i.
Thanks
Sudheerselect *
from user_ind_columns -- or all_ind_columns
where table_name = UPPER('&table_name')
and index_name = UPPER('&index_name');
Regards
Arun
Gurgaon -
How To Know The Column Name Of The Internal Table
HI ,
i have an internal table .
f1 f2 f 3 f4 f5
matnr mbrsh mtart meins minbe
i want to know the column name which depending on the value i.e . if it is matnr then f1 , if mbrsh it is f2 ..so on
Thanks.Hi ,
thanks for your replies . i am elaborating my query .
I have an internal table with 80 fields i.e.f1,f2,f3......f80 . In the first index i will be having the fieldnames
i.e.matnr , mbrsh , meins , mtart ..... . From second index onwards i will be having the corresponding data for the field name. i need to display a particular field in a table control . Here i will be knowing the fieldname. If i can get to know the column name i.e whether f1 or f2 or ... .i Can populate the data into the table control.
Wht i have done is taken a field symbol and used the following code.
read table i_upload index 1 assigning <lv_upload>.
here i will get the initial first record i.e
F1 MATNR
F2 MBRSH
F3 MTART
F4 WERKS
F5 LGORT
F6 VKORG
F7 VTWEG
F8 MAKTX
F9 MEINS
F10 MATKL
F11 BISMT
F12 BRGEW
F13 GEWEI
F14 NTGEW
F15 GROES
F16 KLART
F17 CLASS
F18 SPART
F19 VRKME
F20 UMREN
now i want to the field name .
Hope it is clear this time .
Thanks. -
How to know the Column name which contains some value?
Suppose if a table contains 30 columns, and I want to know the name of the Column that contains my search text(Value).
For Eg. I have a Table named Allowances contains 20 columns for referencing 20 types of allowances. The columns are named like Allw_1,Allw_2,...etc..I know the allowance name(Like "Incentive") and I want to know the Column name on which this allowance name presents.
Pls. help me.Change your DB model.
A Table with columns called allw_1, allw_2, ... begs to be normalized. -
How to know exact size of table with blob column
I have a table with one BLOB column. I ran this query.
select bytes/1024/1024 from user_segments where segment_name='GMSSP_REQUEST_TEMP_FILES'
(user_segments is a view)
it gave me 0.125
It means size of table is 0.125. I have uploaded 3 files to this table. Each of them is of 5 mb. After that I check size of table. but result was same. i.e 0.125.
Can any body tell me how to know exact amount of space consumed by files. I am expecting following result
size should be (5+5+5+0.125)MB
Any help is appreciated.
Thanks.
Akiehttp://download.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_1092.htm#i1581211
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:266215435203#993030200346552097 -
How to rename a column name in a table? Thanks first!
I tried to drop a column age from table student by writing the
following in the sql plus environment as :
SQL> alter table student drop column age ;
but I found the following error
ORA-00905: 缺少关键字 (Lack of Key word)
I have oracle enterprise edition 8.0.5 installed at windows 2000
thank you
And I want to know how to rename a column name in a table?
thanksIn Oracle 8i, your syntax would have worked. However, if I
recall correctly, in Oracle 8.0, you can't rename or drop a
column directly. One way to get around that problem is to
create another table based on a select statement from your
original table, providing the new column name as an alias if you
want to change the column name, or omitting that column from the
select statement if you just want to drop it. Then drop the
original table. Then re-create the original table based on a
select statement from the other table. Then you can drop the
other table. Here is an example:
CREATE TABLE temporary_table_name
AS
SELECT age AS new_column_name,
other_columns
FROM student
DROP TABLE student
CREATE TABLE student
AS
SELECT *
FROM temporary_table_name
DROP TABLE temporary_table_name
Something that you need to consider before doing this is
dependencies. You need to make a list of all your dependecies
before you do this, so that you can re-create them afterwards.
If there are a lot of them, it might be worthwhile to do
something else, like creating a view with an alias for the
column or just providing an alias in a select. It depends on
what you need the different column name for. -
How to use the column names generated from Dynamic SQL
Hi,
I have a problem with Dynamic SQL.
I have written an SQL which will dynamically generate the Select statement with from and where clause in it.
But that select statement when executed will get me hundreds of rows and i want to insert each row separately into one more table.
For that i have used a ref cursor to open and insert the table.
In the select list the column names will also be as follows: COLUMN1, COLUMN2, COLUMN3,....COLUMNn
Please find below the sample code:
TYPE ref_csr IS REF CURSOR;
insert_csr ref_csr;
v_select VARCHAR2 (4000) := NULL;
v_table VARCHAR2 (4000) := NULL;
v_where VARCHAR2 (4000) := NULL;
v_ins_tab VARCHAR2 (4000) := NULL;
v_insert VARCHAR2 (4000) := NULL;
v_ins_query VARCHAR2 (4000) := NULL;
OPEN insert_csr FOR CASE
WHEN v_where IS NOT NULL
THEN 'SELECT '
|| v_select
|| ' FROM '
|| v_table
|| v_where
|| ';'
ELSE 'SELECT ' || v_select || ' FROM ' || v_table || ';'
END;
LOOP
v_ins_query :=
'INSERT INTO '
|| v_ins_tab
|| '('
|| v_insert
|| ') VALUES ('
|| How to fetch the column names here
|| ');';
EXECUTE IMMEDIATE v_ins_query;
END LOOP;
Please help me out with the above problem.
Edited by: kumar0828 on Feb 7, 2013 10:40 PM
Edited by: kumar0828 on Feb 7, 2013 10:42 PM>
I Built the statement as required but i need the column list because the first column value of each row should be inserted into one more table.
So i was asking how to fetch the column list in a ref cursor so that value can be inserted in one more table.
>
Then add a RETURNING INTO clause to the query to have Oracle return the first column values into a collection.
See the PL/SQL Language doc
http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/returninginto_clause.htm#sthref2307 -
How to rename the column name in oracle 8i?
hi,
Does anyone know how to rename the column name in oracle 8i?My method was drop the relationship key first then delete the old column,finally add the new column.
Thanks for your replay.
jingThere is no facilty to rename a column name in Oracle 8i. This is possible from Oracle 9.2 version onwards.
For you task one example given below.
Example:-
Already existed table is ITEMS
columns in ITEMS are ITID, ITEMNAME.
But instead of ITID I want ITEMID.
Solution:-
step 1 :- create table items_dup
as select itid itemid, itemname from items;
step 2 :- drop table items;
step 3 :- rename items_dup to items;
Result:-
ITEMS table contains columns ITEMID, ITEMNAME -
How to get the column names of the table into the Dashboard prompt
how to get the column names of the table into the Dashboard prompt
Thanks & Regards
Kishore PHey john,
My requirement is as follows
I have created a Rank for Total sales by Region wise i.e RANK(SUM(Dollars By Region)) in a pivot table.
My pivot table looks like this
COLUMN SELECTOR: TOTAL US , REGION , DISTRICT , MARKET
---------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK REGION DOLLARS DOLLARS DOLLARS DOLLARS
1 CENTRAL 10 20 30 40
2 SOUTHERN 10 30 30 70
3 EASTERN 20 20 20 60
4 WESTERN 10 20 30 40
When i select the District in column selector
Report has to display rank based on Total Sales by District. i.e
------------------------------------------------- JAN 2009 FEB 2009 MAR 2009
RANK DISTRICT DOLLARS DOLLARS DOLLARS DOLLARS
for this i need to change the fx of rank i.e RANK(SUM(Dollars By Region)) to RANK(SUM(Dollars By District)) and fx of Region i.e Markets.Region to Markets.District dynamically.
so , i need to capture column name of the value selected from the column selector and dynamically i need to update the fx 0f RANK & fx of region.
do you have any solution for this?
http://rapidshare.com/files/402337112/Presentation1.jpg.html
Thanks & Regards
Edited by: Kishore P on Jun 24, 2010 7:24 PM
Edited by: Kishore P on Jun 24, 2010 7:28 PM -
How to get the column name and table name with value
Hi All
I have one difficult requirement
I have some column values and they have given some alias column names but i need to find the correct column name and table name from the database.
For example value is "SRI" and i dont know the table and exact column name so is there any possibilities to find the column name and table name for the given value
Thanks & Regards
Srikkanth.MSearching all the database for a word...
Courtesy of michaels...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
11g upwards
SQL> select table_name,
column_name,
:search_string search_string,
result
from (select column_name,
table_name,
'ora:view("' || table_name || '")/ROW/' || column_name || '[ora:contains(text(),"%' || :search_string || '%") > 0]' str
from cols
where table_name in ('EMP', 'DEPT')),
xmltable (str columns result varchar2(10) path '.')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME es RESEARCH
EMP ENAME es JAMES
EMP JOB es SALESMAN
EMP JOB es SALESMAN
4 rows selected. -
How to find the column name and table name with a value
Hi All
How to find the column name and table name with "Value".
For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name
Any help is highly appricatable
Thanks & Regards
Srikkanth.M2 solutions by Michaels (the latter is 11g upwards only)...
michaels> var val varchar2(5)
michaels> exec :val := 'as'
PL/SQL procedure successfully completed.
michaels> select distinct substr (:val, 1, 11) "Searchword",
substr (table_name, 1, 14) "Table",
substr (t.column_value.getstringval (), 1, 50) "Column/Value"
from cols,
table
(xmlsequence
(dbms_xmlgen.getxmltype ('select ' || column_name
|| ' from ' || table_name
|| ' where upper('
|| column_name
|| ') like upper(''%' || :val
|| '%'')'
).extract ('ROWSET/ROW/*')
) t
-- where table_name in ('EMPLOYEES', 'JOB_HISTORY', 'DEPARTMENTS')
order by "Table"or
SQL> select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('EMP', 'DEPT')
TABLE_NAME COLUMN_NAME SEARCH_STRING RESULT
DEPT DNAME ES RESEARCH
DEPT DNAME ES SALES
EMP ENAME ES JONES
EMP ENAME ES JAMES
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES SALESMAN
EMP JOB ES PRESIDENT
EMP JOB ES SALESMAN
9 rows selected. -
How to know the table name of an InfoCub if we know cube technical name?
How to know the table name of an ODS if we know the ODS technical name?
Thanks
Message was edited by: Kevin Smithhi kevin
if the ODS is a standard ODS then you check the following way in SE16
(for custom ODS objects)
/BIC/A<ODS technical name>00 (Active Data Table)
/BIC/A<ODS technical name>40 (Activation Queue)
/BIC/B<10 digit number> (Change Log Table)
(for SAP defined ODS Objects)
/BI0/A<ODS technical name>00 (Active Data Table)
/BI0/A<ODS technical name>40 (Activation Queue)
/BI0/B<10 digit number> (Change Log Table)
and for Transactional ODS Object you will have only the active data Table. So you need to check with /BIC/A<ODS technical name>00 for the custom ODS objects and /BI0/A<ODS technical name>00 for SAP defined ODS objects.
hope this helps.
regards
vijaykumar -
How to know the technical name of psa
hi BW gurus,
I need to delete data from psa i need to increase the free space. so how to know the technical name of psa. and how to delete the data from psa.
Thanks in advanceShahid,
Agree with Tarun on this...
Check the PSA technical name from the delete PSA option on the PSA screen of the AWB...the PSA name would be /bic/b000*...
Shahid...also chek the table RSTSODS in SE11.
U can find the PSA technical name in the field ODSNAME_TECH..
Just enter the name of the PSA in the ODSNAME field..the PSA name would be
your infosource followed by some extension.
Deleting the data from the PSA:
Shahid,
this can be achieved via a program and also via the standard procedure of going to the PSA in the AWB and choosing the option delete the PSA data...
Here select the requests which are older than any number of days or before any date..
Hope this helps...
Regs.
Nick.
Message was edited by:
Nick -
How to modify a column name & How to modify a constraint name
How to modify a column name?
How to modify a primary key constraint name if the pk has been referenced by another foreign key?
Thanks.Hi,
What version of oracle are you using? If it is 9i,
then you can the command
alter table <table_name> rename column <column_name> to <new_column>;
if it is 8i or earlier, you can create a view with the required names.
hth
Always post the oracle version and the platform you are using to get better response. -
How to pull only column names from a SELECT query without running it
How to pull only column names from a SELECT statement without executing it? It seems there is getMetaData() in Java to pull the column names while sql is being prepared and before it gets executed. I need to get the columns whether we run the sql or not.
Maybe something like this is what you are looking for or at least will give you some ideas.
public static DataSet MaterializeDataSet(string _connectionString, string _sqlSelect, bool _returnProviderSpecificTypes, bool _includeSchema, bool _fillTable)
DataSet ds = null;
using (OracleConnection _oraconn = new OracleConnection(_connectionString))
try
_oraconn.Open();
using (OracleCommand cmd = new OracleCommand(_sqlSelect, _oraconn))
cmd.CommandType = CommandType.Text;
using (OracleDataAdapter da = new OracleDataAdapter(cmd))
da.ReturnProviderSpecificTypes = _returnProviderSpecificTypes;
//da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
if (_includeSchema == true)
ds = new DataSet("SCHEMASUPPLIED");
da.FillSchema(ds, SchemaType.Source);
if (_fillTable == true)
da.Fill(ds.Tables[0]);
else
ds = new DataSet("SCHEMANOTSUPPLIED");
if (_fillTable == true)
da.Fill(ds);
ds.Tables[0].TableName = "Table";
}//using da
} //using cmd
catch (OracleException _oraEx)
throw (_oraEx); // Actually rethrow
catch (System.Exception _sysEx)
throw (_sysEx); // Actually rethrow
finally
if (_oraconn.State == ConnectionState.Broken || _oraconn.State == ConnectionState.Open)
_oraconn.Close();
}//using oraconn
if (ds != null)
if (ds.Tables != null && ds.Tables[0] != null)
return ds;
else
return null;
else
return null;
}r,
dennis
Maybe you are looking for
-
DVD drive problems after 10.4.7 updae
I successfully completed a 10.4.7 update after a nuke & repave of the internal hard disk. At the moment the only applications on my machine are Mac OS 10.4.7 and the iLife suite. Since I installed 10.4.7 I'm having a problem with the internal DVD dri
-
Macbook Pro wont startup on an external backup
My machine: OS X 10.6.3 - 2010 MacBook Pro My backup drive: OS X 10.5.5 - 2004 Power Mac G5 Problem: Backup drive boots fine into my MacBook Air (10.6) , also tested fine on another old white MacBook. But it freezes when my MPB tries to boot from it.
-
Change in page extraction - Acrobat Pro XI
The means to extract pages has changed recently. It no longer appears under tools. Now it is located over the page thumbnails. Can you give me information on when this changed? Was there an automatide update that caused this? I am using another softw
-
Permissions denied (777) on locahost Webserver - unable to upload photos
iBOOK - PHP - LOCALHOST WEBSERVER - MAC OSX 10.4 Hi there - I've searched through the forums and haven't found the answer and so would like any help possible. I'm writing a website and at the moment it is in test-mode. I've created a file-field to up
-
How to create Batch number manually
Hi, We have already done 105 without batch number. But we need to create the batch number for the quantity which is already inwarded in 105. Please let me know how this can be done. regards Suresh