cancel
Showing results for 
Search instead for 
Did you mean: 

BO universe designer

Former Member
0 Kudos

I have a derived table in the universe that has fiscal year and fiscal month and I need to sort it and i used the order by

at the end of the query after by group by. The sql works when I execute it against the database through a query tool, but it

does not work in the derived table. I get an error - teradata database syntax error : that order by is not allowed in subqueries: state 42000

There are about 8 fields in my sql and I need to order by dataset by the first 2 fields only. Is there an alternate solution for this?

Accepted Solutions (0)

Answers (1)

Answers (1)

JohnClark
Active Participant
0 Kudos

I don't think so. I've observed this behavior also.

I think it may be by design. They may be assuming that you will be doing you sorting in the report, not in the derived table.

Former Member
0 Kudos

I have sort order in another derived table and it works there , but does not work in the a new derived table. the sql runs from client tool that connects directly to the database.

Former Member
0 Kudos

One thing that I have noticed is if I have a top 13 in my select clause , then the order by works. But I cannot hardocde 13, since it may be more than 13 rows. Is there a workaround for this issue with derived tables and order by.

Former Member
0 Kudos

I resolved this by just using top 100 by default. I know for sure my data is not going to be larger than that. This question can be closed. Thanks.