Archives of the TeradataForum
Message Posted: Sun, 06 Sep 2009 @ 22:28:19 GMT
Subj: | | Re: INSERT into table with select Order by clause |
|
From: | | McCall, Glenn David |
Dieter Noeth wrote:
| this will result in a syntax error. | |
| And it violates set theory, too. Even Standard SQL doesn't allow it, and Standard SQL is far away from relational theory :-) | |
I agree, I was merely trying to present a solution to the OP's problem. I don't know what came over me with my view. Of course you can't put
an order by on a sub-query that was the original problem.
You can put an order by if you use top so you could do this:
> Replace view pview.target_table
> As
> Select top 100 percent x,y,z
> From pdata.target_table
> Order by z
> ;
But that makes the view "read only". I guess the OP has to revert to the original suggestion - modify the program to include the order by.
Thanks to Dieter for pointing out my error.
Teradata Corporation
Glenn McCall
|