Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with forward slash

Status
Not open for further replies.

keenanbr

Programmer
Oct 3, 2001
469
IE
I'm just beginning to investigate a problem with one of our systems. The problem is that any Company Name that has a forward slash (e.g. company name/aka another company name) causes the application to fall over. I was wondering if the slash might be causing a stored procedure to fall over. Are there any known issues.

Thanks in advance
 
Forward slashes are generally used to execute the stored proc, so possibly that's where it's failing.

I want to be good, is that not enough?
 
Ken said:
Forward slashes are generally used to execute the stored proc...
Here are some observations regarding the "/" character as it relates to Oracle and pre-defined meanings/effects for the "/" character:[ul][li]"/" does not mean "execute the previous procedure"; it is a directive to SQL*Plus to interpret/complile the code that precedes the "/" on previous lines. To "execute" a procedure within SQL*Plus, we use the SQL*Plus "EXEC" or "EXECUTE" command.[/li][li] If a slash appears on a line with other code, and the "/" is not contained in a literal string, then the only pre-defined use of the "/" in Oracle is as a operator to divide the left operand by the right operand. Otherwise, a syntax error occurs.[/li][li]A slash contained in a data expression during execution should have no adverse effect on that execution.[/li][/ul]To illustrate:
Code:
SQL> create or replace procedure keenan (x varchar2) is
begin
    dbms_output.put_line(x);
end; /
/

PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.

SQL> create or replace procedure keenan (x varchar2) is
begin
    dbms_output.put_line(x);
end;
/

Procedure created.

SQL> exec keenan('Hello')
Hello

SQL> exec keenan('Hello/There')
Hello/There
Notice that the "/", when part of a literal in an expression, should have no adverse effect on execution.

So, I'm not convinced that we have identified Keenan's problem. Keenan, is your code short enough (and non-proprietary enough) that you could post it here for diagnosis?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm. The cost will be your freedoms and your liberty.”
 
thanks for the pointers.I'll do some more diagnosis before i continue with this post.

Regards,
 
...and thank you Dave for the correction and clarification to my mussed up understanding!

I want to be good, is that not enough?
 
Ken said:
I want to be good, is that not enough?
Ken, you are good! Your history here proves that. Don't allow a triviality like a "/" to cause you to question your understanding. [2thumbsup]


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
“Beware of those that seek to protect you from harm. The cost will be your freedoms and your liberty.”
 
Too kind, Dave. Must consider a change to my sig!

I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top