Error 3932 while running Vies DDL in SQL assistant

Database
Enthusiast

Error 3932 while running Vies DDL in SQL assistant

Hi All,
When i am running bewlo 2 queries in sql assistant i am getting
error 3932:Only an ET or null statement is legal after a DDL Statement.
REPLACE VIEW A
AS
LOCKING ROW FOR ACCESS
SELECT x,y,z

FROM B where cast(y as date format 'yyyy-mm-dd') = (select cast(max(Y) as date format 'yyyy-mm-dd')
from C) ;

REPLACE VIEW D
AS
LOCKING ROW FOR ACCESS
SELECT
a,b,c

FROM E
where cast(b as date format 'yyyy-mm-dd') = (select cast(max(B) as date format 'yyyy-mm-dd')
from F);

But when i am running it without where clause of first statement it is running fine:
REPLACE VIEW A
AS
LOCKING ROW FOR ACCESS
SELECT x,y,z

FROM B /*where cast(y as date format 'yyyy-mm-dd') = (select cast(max(Y) as date format 'yyyy-mm-dd')
from C) */;

REPLACE VIEW D
AS
LOCKING ROW FOR ACCESS
SELECT
a,b,c

FROM E
where cast(b as date format 'yyyy-mm-dd') = (select cast(max(B) as date format 'yyyy-mm-dd')
from F);

Please help me out as what may be the problem....
As in sql assistant it is an auto commit after each statement..a virtual BT; STATEMENT ; ET;

Urge Forum Gurus to throw some light on same.

4 REPLIES
Enthusiast

Re: Error 3932 while running Vies DDL in SQL assistant

Hi ,
Any takers in this forum???
please come up with some resolution...
Enthusiast

Re: Error 3932 while running Vies DDL in SQL assistant

Hi,
i didn't get any error when i run with WHERE statement. please find the data inserted in view database.

CREATE TABLE TEST3
,FALLBACK
,NO BEFORE JOURNAL
,NO AFTER JOURNAL
(
course_id VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
start_DT DATE FORMAT 'YYYY-MM-DD' ,
course_name VARCHAR(16) CHARACTER SET LATIN NOT CASESPECIFIC

)
PRIMARY INDEX( COURSE_ID );

INSERT INTO TEST1
SEL
'101'
,'2009-02-22'
,'COBOL'

REPLACE VIEW TEST3
AS
LOCKING ROW FOR ACCESS
SELECT
COURSE_ID
,START_DT
,COURSE_NAME

FROM TEST3 where cast(START_DT as date format 'yyyy-mm-dd') = (select cast(max(START_DT) as date format 'yyyy-mm-dd')
from TEST1) ;

SEL * FROM TEST1

course_id start_DT course_name
102 26/02/2010 COBOL
101 22/02/2009 COBOL

IN TABLE DATABASENAME

SEL * FROM TEST3;

course_id start_DT course_name
102 23/02/2010 COBOL
101 26/02/2010 JAVA

IN VIEW DATABASENAME

SEL * FROM TEST3;

course_id start_DT course_name
101 26/02/2010 JAVA
Enthusiast

Re: Error 3932 while running Vies DDL in SQL assistant

Hi Forum Member,
Thanks for you response...but even when i am running that query alone no error is coming...
When both queries are run 1 by 1 together......then the error is coming...please help...
Enthusiast

Re: Error 3932 while running Vies DDL in SQL assistant

I tested succussfully by creating two views( both with WHERE clause) and executing the mcollectily as well as individually. That should not be the problem. Try to explore
DDL and Transaction Processing (Teradata and ANSI Mode)