ORA-00911: invalid character Error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

ORA-00911: invalid character Error

Post by g_rkrish »

I have a simple job just a oci stage where i have sysdate dual in which refered to a set of dates.the field am using has a fuction to_char for ex in the source i have to_char(sysdate,'MMDDYY') which again refered to the source databases.hte error am gettng is ORA-00911: invalid character any thoughts
RK
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

I assume what you have supplied is only part of the sql.

Try running the SQL outside datastage and ensure it returns no errors or warnings.
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post by g_rkrish »

Sainath.Srinivasan wrote:I assume what you have supplied is only part of the sql.

Try running the SQL outside datastage and ensure it returns no errors or warnings. ...
I can view from the view data but i gives error on the job
RK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Find out what Oracle error number -911 actually means - use the oerr command to get a recommendation about what to do about it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Usually that comes from an unresolved parameter - #XXX# - or you've tacked on a trailing semi-colon. Both the hash and semi are "invalid characters" here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post by g_rkrish »

chulett wrote:Usually that comes from an unresolved parameter - #XXX# - or you've tacked on a trailing semi-colon. Both the hash and semi are "invalid characters" here. ...

Basically i have the query in the i/p DB stage is

Select to_char(sysdate,'MMDDYY') from dual

On the ref DB i have query from DB in which from the where clause i use the runtime argument from the source which will be to_char(:1,'MMDDYY') so will that changing again gives the problem or do i take to char out in the source DB stage

any thoughts
RK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, more than just "a simple job just an oci stage", eh? Sorry, but I have no idea what you mean by "On the ref DB i have query from DB in which from the where clause i use the runtime argument from the source which will be to_char(:1,'MMDDYY')". :?

If it means you are using that bind variable in your source query, you can't, that would need to be a job parameter. If "ref DB" means some kind of lookup, that should work provided your first field is marked as a key.
-craig

"You can never have too many knives" -- Logan Nine Fingers
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post by g_rkrish »

chulett wrote:So, more than just "a simple job just an oci stage", eh? Sorry, but I have no idea what you mean by "On the ref DB i have query from DB in which from the where clause i use the runtime argument from the source which will be to_char(:1,'MMDDYY')". :?

If it means you are using that bind variable in your source query, you can't, that would need to be a job parameter. If "ref DB" means some kind of lookup, that should work provided your first field is marked as a key.

sorry about the late reply actually the bug is not with code but with the data stage versions we are migrating from 7.1 to.8.1 .eventually 8.1 gives o/p of oconv(sysdate,'MMDDYY') as 05/22/10 but 7.1 gives as 05 22 10 so corrected the query worked fine.thanks all for the i/p
Last edited by g_rkrish on Mon May 24, 2010 1:59 am, edited 3 times in total.
RK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... yes, things were "fixed" or tightened up to ensure proper operation as the product matured and kudos for catching that issue. And we know you meant "7.5" when you said "8.5". :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post by g_rkrish »

chulett wrote:Ah... yes, things were "fixed" or tightened up to ensure proper operation as the product matured and kudos for catching that issue. And we know you meant "7.5" when you said "8.5". :wink:
Typos :roll:
RK
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, we know. You can always go back and edit it, if you so desire. Of course, then people will wonder what the heck I'm talking about. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply