SQL & PL/SQL :: Update Long String In Table By Command

Jan 23, 2011

I use sqlplus in oracle (linux).I have a table and the string cell have long string .

Like below :

column A Column B

A BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
.....................................BBBBBBBBBBB

So, I need to edit/update the row A and the value in Column B.But the string in Column B is so long and I only need to edit one character.IF I use update command , I need to type very long string and it is easy to wrong edit .

View 8 Replies


ADVERTISEMENT

Update Long String Cell By SQL Command?

Jan 23, 2011

I use sqlplus in oracle (linux). I have a table and the string cell have long string . Like below :

CODEcolumn A    Column B
  
A           BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
.....................................BBBBBBBBBBB

So, I need to edit/update the row A and the value in Column B. But the string in Column B is so long and I only need to edit one character. IF I use update command , I need to type very long string and it is easy to wrong edit .

View 1 Replies View Related

SQL & PL/SQL :: Update Table With Join / ORA-00933 / Command Not Properly Ended

Jan 18, 2013

I'm unable to get the below update SQL to run in Oracle, it's giving me th below error

ORA-00933: SQL command not properly ended.

UPDATE
PDR.PH_Family_Match_by_Chassis a
SET a.Launched = 'Y'
INNER JOIN
PDR.domCHASSIS
ON
a.chassis_id = PDR.domCHASSIS.chassis_id

[code]....

View 8 Replies View Related

SQL & PL/SQL :: Split Long String

Feb 19, 2013

how I can change this function to pass argument that length is 32676 .

create or replace TYPE "HRS_SPLIT_TBL_T" as table of varchar2(32767);

create or replace function hrs_split
(
p_list varchar2,
p_del varchar2 := ','
) return hrs_split_tbl_t pipelined
is

[Code]...

I got error String literal too long when execute select below

select distinct COLUMN_VALUE Tbat_latn
from table(
HRS_SPLIT( 'PER0000002,PER0000094,PER0000094,PER0000096,PER0000096,
PER0000024,PER0000024,SAB0000001,SAB0000001,PER0000002,
PER0000096,PER0000094,PER0000094,PER0000002,PER0000024,
PER0000024,PER0000096,PER0000096,PER0000094,PER0000094,
PER0000002,PER0000024,PER0000024,PER0000096,PER0000096,
PER0000094,PER0000094,PER0000002,PER0000024,PER0000024,

[Code]....

View 12 Replies View Related

Backup & Recovery :: RMAN Command Hang Long Time?

Mar 20, 2012

We would take backup regulary by RMAN(catalog). Last two days we could not take backup. Backup start but after take backup some datafile then rman does not do anything.

View 4 Replies View Related

Result Of String Concatenation Is Too Long

Jan 4, 2008

I am receiving a ORA-01489: result of string concatenation is too long error on the following code. The size of the MNO_NOTE fields is: MNO_NOTES_1 X(2000). I'd rather not modify the DB table column size, but rather that capacity of the "notes", or whatever structure the concatenated string is stored in. Could I use the substring method?

SELECT TO_DATE(TO_CHAR(mno_date_recorded,'yyyymmdd')||
TO_CHAR(mno_time_recorded,'0009'),'yyyymmddhh24mi')
AS create_date,
stf_id AS create_user,
RTRIM(MNO_NOTES_1)||
RTRIM(MNO_NOTES_2)||
RTRIM(MNO_NOTES_3)||
RTRIM(MNO_NOTES_4)||
RTRIM(MNO_NOTES_5)||
[code]...

View 1 Replies View Related

ORA-01489 - Result Of String Concatenation Is Too Long

Jul 25, 2012

I have a sql query which has around 115 columns and out of which 25 columns are of varchar2(2000) and when I run the query I get the ORA-01489: result of string concatenation is too long error.

I tried to use to_clob function for the columns having varchar2(2000) and if I run the sql from toad , it works fine, but when I tried to run the same query from sqlplus and spool to a file, the result doesn't come in a single line. I have tried to import the spool file to my local and open it , but still it doesn't come in a single line, the data is trucated This is how my data looks in the spool file.

1-L31OGM|Red|1|Due|Qualified|02/08/2012||02/08/2012| you are missing a message.

These are the below set options used in the query . I even tried set long 100000000 and also set longchucksize option also, I have tried with WRAP OFF and WRAP ON also ,but still it doesn't work.

SET HEADING OFF
SET WRAP OFF
SET LINESIZE 32000
SET FEEDBACK OFF
SET PAGESIZE 0
SET LONG 32000
SET TRIMSPOOL ON
SET ECHO OFF
SET TERMOUT OFF

get the data in a single line and using utl_file package is not an option in our project due to security reason.

View 4 Replies View Related

SQL & PL/SQL :: ORA-01489 - Result Of String Concatenation Is Too Long

Aug 8, 2011

my rdbms, os version

SYS@prod> select PLATFORM_ID, PLATFORM_NAME from v$database;
PLATFORM_ID
-----------
PLATFORM_NAME
-------------------------------------------------------------------------
12
Microsoft Windows x86 64-bit
[code]...

as I googled the solution does not seems to apply to my case.it very puzzling that such a short query can produce

ORA-01489: result of string concatenation is too long.

View 3 Replies View Related

SQL & PL/SQL :: Select Length - String Literal Too Long

Jun 21, 2011

If i try to find length of the string with more than 4000 char in SQL Developer it throws error "ORA-01704: string literal too long". if anything i need to SET in preference.

select length('string with more than 4000 char) from dual;

View 10 Replies View Related

ORA-01489 / Result Of String Concatenation Is Too Long

Jul 30, 2013

when i run the interrogation bellow :

SELECT 'Existing Tables: ' || LISTAGG(table_name, ',') WITHIN GROUP (ORDER BY table_name) tablenames FROM user_tables;

i receive the error :

ORA-01489: result of string concatenation is too long
01489. 00000 - "result of string concatenation is too long"
*Cause: String concatenation result is more than the maximum size.
*Action: Make sure that the result is less than the maximum size.

View 1 Replies View Related

SQL & PL/SQL :: ERROR At Line 1 - ORA-01489 - Result Of String Concatenation Is Too Long

Aug 13, 2013

I am getting below error when i try to update in my table

ERROR at line 1:
ORA-01489: result of string concatenation is too long

how to resolve this. Note :This is Update query not select query

View 2 Replies View Related

PL/SQL :: Remove Duplicate Values From Concatenated Long String Of State Codes

Dec 4, 2012

Database version: 11.2.0.3.0

I need to remove duplicate values from concatenated long string of state codes(comma separated). Ex: 'VA,VA,PA,PA,CT,NJ,CT,VA'. I tried following query and did not get required out put.

select regexp_replace('VA,VA,PA,PA,CT,NJ,CT,VA,CT,PA,VA,CT','([^,]*)(,1)+($|,)', '13') new_str from dual;

Define Meta-character's format in regular expression to get desired result. Out put required: VA,PA,CT,NJ (with out any duplicates).

View 4 Replies View Related

Long Running Update Statement In Sqlplus Session

Oct 7, 2010

I ran one long running update statement in my sqlplus session, where it took hours together since we have millions of rows on the table.lock the system and left the office , the next day I found my system is rebooted, hope the session would have performed the long running update statement.

Now, I need to issue a commit for the session, since my system is rebooted I don't have opened session with me. so, How to issue commit to the session, which I have issued long running update statement.

View 3 Replies View Related

Windows :: How Search Specific String In PDF File From Command Prompt

Nov 21, 2012

I have a requirement in which i have list pdf files(from thousands of pdf files) having particular string from a command prompt.I have tried find command but that has some limitation. its working upto 3 digit string only.how can i acheive this.remember i have to do this through command prompt only.

View 1 Replies View Related

SQL & PL/SQL :: Update Command

Jun 7, 2011

here is my table...

id name bits

A 1 011011101 00
B 2 011011111 01
C 3 100100010 11

Here, I need to write a query to change 0 to 1 and 1 to 0 for every record value in table of bits column.

for ex: 011011101 00 of id - A must be changed to 100100010 11

similarly, 100100010 11 of id - C must be changed to 011011101 00

Now I need to write a query to update values of bits column in one shot.

View 4 Replies View Related

SQL & PL/SQL :: Use FROM Clause In Update Command?

Jul 13, 2011

Can we use FROM clause in update command?

View 2 Replies View Related

SQL & PL/SQL :: Combine Update And Insert Command?

Jul 23, 2012

i have a given pl/sql program that first deletes records out of a table and afterwards inserts new rows. now for example 2 rows out of 10 have a foreign constraint and can not be deleted that easily anymore. so i delete the ones i am able to (with the where not exists clause).

now i want to update the records who have a foreign key constraint and the rest with a regular insert. how would i do this the easiest way. i thought i could use insert with a where clause!!

here i have some part from the original

declare
procedure add(
i_id pls_integer,

[Code].....

View 3 Replies View Related

SQL & PL/SQL :: How To Find Out Which Rows Affected By Update Command

Dec 7, 2010

Assume that we have table Test with a column TestId and Status. This table is having 10,000 records. Now, we need to write a stored procedure that does the following:

1) Select top 10 rows whose "Status = NEW'

2) Update the selected top 10 rows with "Status = PROCESSING"

3) Return those top 10 rows.

Assuming there are hundreds of such requests coming to Oracle database, how can we make sure each request NEVER gets a duplicate record at any given point of time and how to fetch the records that have been updated individual request?

View 1 Replies View Related

Backup & Recovery :: 11g R2 - How To Update Control File With Switch Command

Oct 3, 2011

I have restored all datafile to new location (that is ASM) earlier it was on file system using set new name command (RMAN). Now when i'm trying to update control file with swicth command it is prompting error. Version is 11g R2.

RMAN> SWITCH DATAFILE ALL;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "all": expecting one of: "double-quoted-string, integer, single-quoted-string"
RMAN-01007: at line 1 column 17 file: standard input

View 3 Replies View Related

SQL & PL/SQL :: Update String Anywhere In Text

Mar 3, 2011

We have table with a column REMARKS,where in text somewhere we are storing name also,Now we are planning to update only names with their service number

REMARKS Column Sample row text:

1.It has been created by John
2.John Created this
3.Assistance taken by John for this

Any query which can only replace john in all rows with 1234 .I can update the value if John comes at same position in all rows using SUBSTR() and concat rest of the text.But not getting how to update JOHN in rows at different positions.

View 7 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

SQL & PL/SQL :: Concatenate String To Number Field In Update Statement

Oct 4, 2011

I need to concatenate string to the number field in an update statement like this:

update test1 set model_pin = seq_no || '_' || model
where eoc_code like 'AEW%'

When I run this command in sql , I get ERROR at line 1:

ORA-01722: invalid number

View 7 Replies View Related

UPDATE Date / Literal Doesn't Match Format String

Nov 29, 2007

When I try to update a date column with this:

 UPDATE
        event_request
    SET
        REQ_EVENT_DATE = TO_CHAR(REQ_EVENT_DATE - INTERVAL '1' HOUR, 'yyyy-mm-dd hh24:mi')
    WHERE
        eventID=123 

Oracle returns this error:

 ERROR at line 4:ORA-01861: literal does not match format string 

where line 4 is REQ_EVENT_DATE = TO_CHAR(REQ_EVENT_DATE - INTERVAL '1' HOUR, 'yyyy-mm-dd hh24:mi').The REQ_EVENT_DATE field was originally populated with this stripped down query:

$date = '2007-12-25 08:35'; INSERT INTO (REQ_EVENT_DATE) VALUES (to_date('$date', 'yyyy-mm-dd hh24:mi'));

So - what is wrong with the UPDATE query?

View 1 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

Forms :: Insert And Update Directly Into Table From Pre Update Trigger Of Block?

May 14, 2010

I have a base table (Table A) block with multiple records displayed. I need to track audits to this underlying table in the following way:

If user updates a field in the block I want the pre-changed record's audit fields to be set and I need to create a copy of the record with the changed values. Basically any changes will result in the record being logically deleted, and a copy record created with the newly changed values.

Tried to implement in the block's pre-update trigger which will call a package to directly update Table A then Insert into Table A, then requery the block. Is there a clean and efficient way to do this?

View 4 Replies View Related

SQL & PL/SQL :: Create Trigger To Update Table B After Update On Table A

Jul 21, 2011

I have table test1(id,name) and table test2(id,,name)

Now when I update name column of a row on test1 I want the same value to be updated for the same id in test2.

So I wrote this trigger but its not working

create trigger test_trigger after update on test1 for each row
begin
update test2 set name=new.name where test2.id=id
end
/

View 9 Replies View Related

SQL & PL/SQL :: Create Trigger That Will Update Table When There Is Insert / Update

May 29, 2012

i want to create a trigger that will update a table when there is an insert or update.i can't across this error that i don't even know what it means "table %s.%s is mutating, trigger/function may not see it".

*Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it.

*Action: Rewrite the trigger (or function) so it does not read that table.

CREATE OR REPLACE TRIGGER set_date_end
BEFORE INSERT OR UPDATE OF issued ON shares_amount
FOR EACH ROW
DECLARE
BEGIN
INSERT INTO shares_amount(date_end) VALUES(SYSDATE);
END set_date_end;
/

View 3 Replies View Related

Drop Statement On Table Taking Long Time

Sep 20, 2010

We are firing a normal Drop command on our database and the database version is 10.2.0.4.The database is running on AIX v5.The command is taking more time than usual .

When i am monitoring the session i can see that a call is being made to procedure "aw_drop_proc".Could i ask you if this is something that is taking more time than usual.

We are not having any partitions on the nested tables .We have a pack of tables and we are dropping this pack through a procedure.The pack comprises of nested tables & normal tables.To drop a nested table it is taking around 6 seconds(Table with no rows) and a normal table(With no rows) it is taking 17 milli seconds.We have a partition on Normal table.

The same operation in windows is taking very less time when compared to AIX.

View 5 Replies View Related

Precautions For Converting A Table Field From Long To Clob

Jul 31, 2012

I am more of a C/C++ guy and relatively amateur in oracle. I have to update a table field from "Long" to "CLOB". I have planned to do a simple alter table, and as far as I know there won't be any issues.

Queries:
1. Although I have triple checked, is there any scenario under which there can be any data loss during the data type change? The data is very critical and no data loss can be entertained.
2. Is there any easy way to update all the related views without having to do so manually?
3. Any particular precautions I should take before introducing the change?

View 2 Replies View Related







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