Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Best way to update large field
A copy of this was sent to techsup_at_mindspring.com (James Williams) (if that email address didn't require changing) On Wed, 23 May 2001 20:20:53 GMT, you wrote:
>"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>
>Actually another program reads this column and uses it to create DML.
>The data to be updated is a literal. It is not a subquery.
>
then you need to use SINGLE quotes:
update t set x = "Y"
would try to set the Column X to the Column Y in the table t.
update t set x = 'Y'
would set the column X to the literal string value 'Y'
in answer to the very next question you will have "how do I use a character string literal that has quotes in it?" the answer is:
update t set x = 'How''s this working'
use two quotes for every single quote in the character string constant
>>The syntax is
>>update <table>
>>set <column>= ( <subquery>)
>>
>>NOT
>>set <column > = "<subquery>"
>>
>>Regards,
>>
>>Sybrand Bakker, Oracle DBA
>>
>>"James Williams" <techsup_at_mindspring.com> wrote in message
>>news:3b0bf935.110601234_at_news.mindspring.com...
>>> Get the dread ora_00972 trying to do the below. I can insert the row
>>> but would like to update an existing row. Any good id
>>>
>>> SQL> @order
>>> ERROR:
>>> ORA-00972: identifier is too long
>>>
>>>
>>> SQL> edit order
>>> No lines in the buffer
>>> "order.sql" 3 lines, 331 characters
>>> 1 UPDATE control
>>> 2 SET ENTITY_LIST_SQL = "select (entity_key) from it_order where
>>> to_date(
>>> due_dte, 'YYYYMMDD' ) < (sysdate - entity_criteria) and cmpl_stat_cd
>>> NOT LIKE '
>>> %' and cmpl_stat_cd IS NOT NULL and it_order.cis_ordr_nbr in (select
>>> cis_ordr_n
>>> br from upl_detail_at_purge38) order by (entity_key)"
>>> 3 WHERE ENTITY = 'ORDER'
>>> ~
>>>
>>> SQL> show user
>>> USER is "XXX"
>>> SQL> desc control;
>>> Name Null? Type
>>> ----------------------------------------- --------
>>> ----------------------------
>>> ENTITY NOT NULL VARCHAR2(30)
>>> PROCESS_TYPE NOT NULL VARCHAR2(1)
>>> ENTITY_CRITERIA NOT NULL VARCHAR2(30)
>>> COMMIT_COUNTER NOT NULL NUMBER(8)
>>> LUD_START DATE
>>> LUD_STOP DATE
>>> REVISION_CD NOT NULL VARCHAR2(1)
>>> LUD NOT NULL DATE
>>> HISTORY_FLAG VARCHAR2(1)
>>> ENTITY_LIST_SQL VARCHAR2(500)
>>> DESCRIPTION VARCHAR2(5
>>
>>
-- Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries Howtos and such: http://asktom.oracle.com/ http://asktom.oracle.com/~tkyte/ Oracle Magazine: http://www.oracle.com/oramag Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Thu May 24 2001 - 08:10:11 CDT