on 09-10-2008 5:07 PM
Hi,
I need to implement a universe object that is equal to a datetime related number (epoch time in this case).
We can get the epoch number in the SQL by using TIMESTAMPDIFF, but this results in an SQL query that performs a calculation for each record.
i.e.,
SELECT FROM WHERE (() >= bigint((TIMESTAMPDIFF(2 ,char( (current_timestamp - 1 Minutes ) - (TIMESTAMP('1970-01-01-00.00.00'))))))+ 86400) What I need to have is something like: SELECT FROM WHERE BETWEEN 222562413545 AND 12354786787444
The numbers above therefore to be calculated in Objects.
Is this possible? To create a Object with a constant value, or one that is variable according to changes in time?
Sounds very simple, and if BO cannot do it I would be very surprised (and very disappointed).
Thanks
You certainly can. You can type the number in the select of an object. It won't parse, but it will work at query time.
If you want to make it parse then you have to associate this value with a table, but why worry about parsing if it works.
Kashif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks....
So could I therefore have an object that is equal to, say:
TIMESTAMPDIFF(2 , char( (current_timestamp -1 hours ) - (TIMESTAMP('1970-01-01-00.00.00')))
But would that SQL string be entered into the query, or would the result of that calculation be entered into the query? It's the RESULT of that calculation that I need to have entered into the query....
Hi,
In fact you need to use your SQL expression in a universe predefined condition.
Than you just need to drag and drop this condition in the query panel filter pane.
If you want to have this condition to be automatically added in the query, you have to set this filter as mandatory (feature availablein XI 3.0) associated to a specific class (for instance a class where you need to use this SQL expression): the filter is automatically added whate ver the object you are using in the query coming from the selected class where the filter has been associated.
You can also use @Prompt expression for the 2 boudaries in order to have a more dynamic query.
Regards,
Didier
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.