0 - 7 of 7 tags for with

Hi,
 
I'm trying to do something like below, but its giving me syntax error,
can anyone please tell me what is the issue and how to fix this.
 
with cte0(ID,int_col1) as(
    select row_number() over (order by (select 1)) AS ID,int_col1 from shuffletest
)
update cte0 set int_col1=ID;
 

I have a table to be updated having 3 columns ext_JobGroupCd,ext_JobCd,ext_OrderIngroup

replace procedure myprocess(in p_date date)

 

Begin

 

insert into my_table(field_1,field_2)

 

with tmp_tab(field1,field2,field3) as

 

(select field1,field2,field3

 

    From my_table2)

 

select field1,field2

 

replace procedure myprocess(in p_date date)

 

Begin

 

insert into my_table(field_1,field_2)

 

with tmp_tab(field1,field2,field3) as

 

(select field1,field2,field3

 

    From my_table2)

 

select field1,field2

 

replace procedure myprocess(in p_date date)

 

Begin

 

insert into my_table(field_1,field_2)

 

with tmp_tab(field1,field2,field3) as

 

(select field1,field2,field3

 

    From my_table2)

 

select field1,field2

 

Yesterday our DBA's completed the update of our Teradata test environment to version 14.

Is it possible to put a common table expression within a view?

The following SQL works fine

WITH myCTE (account_number) AS
(
SELECT account_number
FROM dbname.tablename
WHERE columnname = 'somevalue'
)

SELECT account_number
FROM myCTE;

However when I try to put this into a view . . .

CREATE VIEW myCTE_VIEW AS
(

WITH myCTE (account_number) AS
(
SELECT account_number
FROM dbname.tablename
WHERE columnname = 'somevalue'
)

SELECT account_number
FROM myCTE

)