3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and the

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Enthusiast

3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and the

Came across this accidently:

 

While creating view (SQL Assistance ) I got the error which I am not able to understand, please help me

 

CREATE MULTISET TABLE table_1
(
col1 INTEGER,
col2 VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
col3 INTEGER NOT NULL,
col4 TIMESTAMP(0),
col5 VARCHAR(5) CHARACTER SET LATIN NOT CASESPECIFIC,
col6 INTEGER
)
PRIMARY INDEX ( col1 ,col5 );

--SUCCESS

SELECT col1
,col2
,col3
,col4
,col5
,col6
FROM table_1;

--SUCCESS
CREATE VIEW VIEW_1
AS
LOCKING ROW FOR ACCESS
SELECT col1
,col2
,col3
,col4
,col5
,col6
FROM table_1 ;

--SUCCESS

 

REPLACE VIEW VIEW_1
AS
LOCKING ROW FOR ACCESS
SELECT col1
,col2
,col3
,col4
,col5
,col6
FROM table_1 ;

--SUCCESS

 

DROP VIEW VIEW_1;

--SUCCESS

 

CREATE OR REPLACE VIEW VIEW_1
AS
LOCKING ROW FOR ACCESS
SELECT col1
,col2
,col3
,col4
,col5
,col6
FROM table_1 ;

--NO SUCCESS, FAILING WITH FOLLOWING ERROR

/*

---------------------------
Teradata SQL Assistant
---------------------------
3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and the 'OR' keyword.
---------------------------
OK
---------------------------

*/

 

 

 

 

 

5 REPLIES
Apprentice

Re: 3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and

Hi,

 

"CREATE OR REPLACE VIEW " is invalid syntax.

 

You can CREATE VIEW or you can REPLACE VIEW.

 

Cheers,

Dave

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Enthusiast

Re: 3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and

Thanks Dave for your reply.

But this syntax was working for older versions, I guess. Am I right?

 

Apprentice

Re: 3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and

Not as far as I know.

 

Cheers,

Dave

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Apprentice

Re: 3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and

The "replace view" command will create or replace as appropriate, but the 'create or replace view' syntax is not valid.

HTH

Dave

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Junior Contributor

Re: 3707: Syntax error, expected something like a 'METHOD' keyword between the 'CREATE' keyword and

CREATE OR REPLACE is proprietary Oracle syntax which never worked in Teradata.