![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
So, I'm asking if there is a way to define, for a table, a default "order by" clause to use when no "order by" clause is specified in a "select" query statement on that table. |
|
If not, I think the only alternative is to create a view on that table. Is it correct? |
|
Hi, I have this problem. My software creates a temporary table (#MyTable). This table should be used by a report engine and printed each time with different "order by" clause, depending on some parameters (and the program that creates the temporary table obviously knows these parameters...) Now, I don't want to pass these paramete to the report engine, because I want that the logic of the report will stay only in the program that create the table (the report engine should onnly do a "SELECT * FROM #MyTable"). So, I'm asking if there is a way to define, for a table, a default "order by" clause to use when no "order by" clause is specified in a "select" query statement on that table. If not, I think the only alternative is to create a view on that table. Is it correct? Thanks, Davide. |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
My software creates a temporary table (#MyTable). This table should be used by a report engine and printed each time with different "order by" clause, depending on some parameters (and the program that creates the temporary table obviously knows these parameters...) Now, I don't want to pass these paramete to the report engine, because I want that the logic of the report will stay only in the program that create the table (the report engine should onnly do a "SELECT * FROM #MyTable"). So, I'm asking if there is a way to define, for a table, a default "order by" clause to use when no "order by" clause is specified in a "select" query statement on that table. If not, I think the only alternative is to create a view on that table. Is it correct? |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Thanks to everyone, I think the I will pass the order by clause to the report engine. |
![]() |
| Thread Tools | |
| Display Modes | |
| |