cancel
Showing results for 
Search instead for 
Did you mean: 

Create Universe Object that is equal to a number

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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....

Former Member
0 Kudos

In this case it will be the SQL statement in the select of the query. Would that cause an issue in what you are trying to achieve?

Kashif

Former Member
0 Kudos

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

Answers (0)