Home » Developer & Programmer » Forms » forms_ddl problem
forms_ddl problem [message #78398] Wed, 20 February 2002 02:19 Go to next message
UMA MAHESWARA RAO
Messages: 9
Registered: December 2001
Junior Member
HELLO

THE FOLLOWING CODE IS GIVING ERROR WHILE EXECUTING
ON A WHEN-BUTTON-PRESSED TRIGGER

DATE1 AND DATE2 ARE 2 FIELDS IN THE FORM.

'TABLE CREATION FAILED' IS THE OUTPUT.

BEGIN
FORMS_DDL('CREATE TABLE TEMP
AS
SELECT NAME,DOB,SEX FROM STUDENT
WHERE DOB BETWEEN :DATE1 AND :DATE2');
IF NOT FORM_SUCCESS THEN
MESSAGE('TABLE CREATION FAILED');
ELSE
MESSAGE('TABLE CREATED');
END IF;
END;

ANY KIND OF HELP IS WELCOME

THANK YOU

UMA
Re: forms_ddl problem [message #78399 is a reply to message #78398] Wed, 20 February 2002 03:23 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
try this way
declare

str varchar2(1000);
BEGIN
str:=' CREATE TABLE TEMP
AS
SELECT * from emp
WHERE hiredate
BETWEEN to_date('''||to_char(:block6.date1)||''',''dd-mon-yyyy'') AND to_date('''||to_char(:block6.date2)||''',''dd-mon-yyyy'')';

message(str);
FORMS_DDL(str);
IF NOT FORM_SUCCESS THEN
MESSAGE(dbms_error_text);
ELSE
MESSAGE('TABLE CREATED');
END IF;
END;
Re: forms_ddl problem [message #78401 is a reply to message #78398] Wed, 20 February 2002 03:46 Go to previous message
shashikant
Messages: 6
Registered: February 2002
Junior Member
Hi
Do some few changes in ur code ..

FORMS_DDL('CREATE TABLE TEMP
AS
SELECT NAME,DOB,SEX FROM STUDENT
WHERE DOB BETWEEN '''||:date1||''' AND '''||:date2||'''');

IF NOT FORM_SUCCESS THEN
MESSAGE('TABLE CREATION FAILED');
ELSE
MESSAGE('TABLE CREATED');

shashi
Previous Topic: Urgent !!! Web Forms Security / Forms Server
Next Topic: Oracle Developer Graphics 2.5
Goto Forum:
  


Current Time: Mon Mar 30 00:20:52 CDT 2020