order by in temp table

Database
Enthusiast

order by in temp table

hi ,

 when i try to use order by in:

CREATE MULTISET VOLATILE TABLE tt_PopToInclude,NO LOG AS

(

SELECT ......

from....

order by....

)

 

TeraData Executed as Single statement.  Failed [3706 : 42000] Syntax error: ORDER BY is not allowed in subqueries. 

how can i fix it?

 Thanx!!

2 REPLIES
Supporter

Re: order by in temp table

remove the order by ;-)

Senior Apprentice

Re: order by in temp table

Well, you got the same answer already twice yesterday

there's no order in a table, thus applying an ORDER BY within a INSERT is useless (=not allowed).

Why do you think you need it?