Home » SQL & PL/SQL » SQL & PL/SQL » SQL underdstands variable in a wrong way
SQL underdstands variable in a wrong way [message #1141] Wed, 03 April 2002 23:57 Go to next message
Pawel Szymanski
Messages: 1
Registered: April 2002
Junior Member
Hello , I have following problem.
The code:
1) MY_STRING VARCHAR2(255);
2a) MY_STRING:='AAA,BBB';
2b) MY_STRING:='100,BBB';
3) COMMA_TO_TABLE(MY_STRING,ENTIER,MY_TABLE);

Is working properly with a) attribution and showing an error with b) solution.
This is probabely because 100 is treated as an integer.
Can't COMMA_TO_TABLE split a string which contains digits?

DECLARE
*
ERROR at line 1:
ORA-00931: missing identifier
ORA-06512: at "SYS.DBMS_UTILITY", line 79
ORA-06512: at "SYS.DBMS_UTILITY", line 108
ORA-06512: at line 24

Pawel Sz
Re: SQL underdstands variable in a wrong way [message #1145 is a reply to message #1141] Thu, 04 April 2002 04:06 Go to previous message
John R
Messages: 156
Registered: March 2000
Senior Member
As far as I can tell, the Comma_to_table procedure is part of a suite of funtctions for handling object names in Oracle.
One side of this is that each of the names you pass in in the list has to be a valid object name (ie would be valid as a table name for example), so starting with a numeric character is forbidden.
Your best bet is to write a simple function that does the same task.
Previous Topic: SQL Query
Next Topic: HAving trying trying to convert a number to a currency format.
Goto Forum:
  


Current Time: Thu Apr 25 10:43:47 CDT 2024