Archives of the TeradataForum
Message Posted: Fri, 25 Jan 2008 @ 19:56:50 GMT
I have an issue with an select resultset which I want to sort in a certain way.
Table is a time dimension with MonthID (200501, 200502 etc.) and a description (Dez. 2005, Jan. 2005, etc.)
I have a view on top of the Table which is just doing a replace view.... as lock row for access select * from ...;
The View will be access by a Frontend Tool. As soon as I am accessing the Dimension the Order of the Values will not be like
.... 200501 200502 200503 .....
.... 200503 200501 200502 .....
It seems that the result set will have the order of the Hashrow Number or the order of insertion (actually I have not Idea which order is used). The same result will appear if I am doing a simple select * from table in Queryman.
I can do a sort afterwards but this is kind of annoying. So I would like to order the result set from the beginning as shown in the first option. Unfortunately Teradata does not allow to do a sort in the view (this would be too easy). Also a value orderd Sec. Index does not the desired order....
Does anyone have an idea how I can force the system to do the sort as I want to have, without any interaction on the front end tool?
Any help is highly appreciated.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|