Home » Developer & Programmer » Forms » Executing DDL commands in Forms
Executing DDL commands in Forms [message #2355] Tue, 09 July 2002 10:15 Go to next message
Godwin
Messages: 37
Registered: January 2002
Member
I want to execute this DDL statement in forms 6 but getting some compilation error:
e.g
FORMS_DDL('create view Rank_V
as select paanum,decode( paapcde,1,'SM',2,'SM',3,'SM',4,'SM',5,'SS',6,'JS',7,'SM',8,'SM',9,'SM',10,'SM',11,'SS',12,'CA',13,'JS',14,'DE',15,'TA',16,'VS',17,'GA',20,'PT',25,'PE',27,'NS',30,'HA',35,'EE') rank
from paapr1');
but get the error message "Encounted the symbol "SM" when expecting one of the ff .(),*@%$/=.+ is not range...

Does it have to do with the Character SM and how do i got by it.
Thanks.
Re: Executing DDL commands in Forms [message #2366 is a reply to message #2355] Tue, 09 July 2002 22:00 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
The reason you're getting this error is that you don't escape your single quotes in the statement. You should double every quote you want to include 'as is', like in the following:
FORMS_DDL('create view Rank_V
as select paanum,decode( paapcde,1,''SM'',
....
....
from paapr1');

If you let the quotes like they are, the PL/SQL compiler figures that your literal ends after the comma.

HTH,
MHE
Previous Topic: variable := NAME_IN('list_name');
Next Topic: Forms / Reports 6i + Personal Oracle
Goto Forum:
  


Current Time: Fri Mar 29 07:04:33 CDT 2024