cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a custom column in Universe

Former Member
0 Kudos

Hello,

I have a requirement where I need a custom column in Universe. Basically I have five column and need a sixth column which gives me value from 0 to 23 based on the previous five columns

[Plant] [Equipment] [ Method] [ Media][ Time Begin] [ Custom field]

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [1] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [2] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [3] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [4] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [5] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [..] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 00:00:00]    [23] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [1]

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [2] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [3] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [4] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [5] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [..] 

[1014]     [ACL]         [ Hourly]         [AIR]    [2014-02-13 01:00:00]    [23] 

Basically data is same in all the columns for first 23 readings. In 24th reading data changes in [Time Begin] column..in that case the Custom field should start from [1].

Any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you are using oracle as backend database then use the

ROW_NUMBER()  OVER (PARTITION BY Time Begin ORDER BY Plant) AS Custom field

Concept should same for other databases too.

Thanks


Answers (0)