Re: Problem with Oracle adapter and update
Re: Problem with Oracle adapter and update
- Subject: Re: Problem with Oracle adapter and update
- From: Tarun Reddy <email@hidden>
- Date: Tue, 10 Oct 2006 20:09:21 -0600
On Oct 10, 2006, at 8:02 PM, shaun wrote:
Hi,
Tarun Reddy wrote:
On Oct 10, 2006, at 7:02 PM, Art Isbell wrote:
On Oct 10, 2006, at 2:36 PM, Tarun Reddy wrote:
Trying this in sqlplus with this statement:
UPDATE IDEA SET STATUS = "A" WHERE (IDEA_OID = 1 AND AVGRATING
is NULL AND CATEGORY_OID = 6 AND IDEADESC = "afdsafadsfasfa"
AND IDEANAME = "fdsfadf" AND IDEAURL is NULL AND NUMRATINGS is
NULL AND PARENT_OID is NULL AND STATUS = "P" AND SUBMIT_DATE =
"2006-10-08 00:00:00" AND USER_OID = 1)";
returns:
ERROR:
ORA-00972: identifier is too long
You have an unmatched double quote near the end of the above
statement. This might cause the error in your sqlplus test, but
probably not in your WO app.
If you eliminate the unmatched double quote, replace the
remaining double quotes with single quotes, and rerun the
statement in sqlplus, does the error still occur? Searching
Google for "ORA-00972" produced one response that claimed that
this bogus error message can occur when double quotes are used.
Another Google search results states that an incorrect column
name can cause this error. Is it possible that an attribute in
your eomodel has a column name that doesn't match a column name
in the IDEA table?
Art,
First off, I appreciate your help!
I changed the SQL to
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL
AND PARENT_OID is NULL AND STATUS = 'P' AND SUBMIT_DATE = to_date
('2006-10-08 00:00:00', 'yyyy-mm-dd hh24:mi:ss') AND USER_OID = 1)
2 ;
That returned 0 rows updated.
It seems like the SQL generated is off. I think it is the
SUBMIT_DATE part. My SQL maybe off.
UPDATE IDEA SET STATUS = 'A' WHERE (IDEA_OID = 1 AND AVGRATING is
NULL AND CATEGORY_OID = 6 AND IDEADESC = 'afdsafadsfasfa' AND
IDEANAME = 'fdsfadf' AND IDEAURL is NULL AND NUMRATINGS is NULL
AND PARENT_OID is NULL AND STATUS = 'P' AND USER_OID = 1);
What is the oracle data type for the SUBMIT_DATE attribute?
Hi Shaun,
SQL> desc IDEA
Name Null? Type
----------------------------------------- --------
----------------------------
AVGRATING FLOAT(126)
CATEGORY_OID NOT NULL NUMBER
IDEADESC NOT NULL VARCHAR2(4000)
IDEANAME NOT NULL VARCHAR2(255)
IDEA_OID NOT NULL NUMBER
IDEAURL VARCHAR2(255)
NUMRATINGS NUMBER
PARENT_OID NUMBER
STATUS NOT NULL VARCHAR2(1)
SUBMIT_DATE NOT NULL DATE
USER_OID NOT NULL NUMBER
In my EO Model
submitDate maps to SUBMIT_DATE with
External Type of DATE
Value Class (Java) of NSTimestamp
Value (not sure what this might affect) of D
Thanks,
Tarun
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden