on 09-21-2017 7:58 PM
Requirement is as follows:-
1. v_currentMsgID = if v_CurrentMsgId = 0 THEN ( if table.MSGID is null , 0 , table.MSGID ) +1,
ELSEIF( v_rowcount >= 25000 ) then v_currentMsgID+1 else
v_currentMsgID.
2. v_rowcount = v_currentMsgID <> v_prevMsgId , 1 , v_rowcount+1
3. v_prevMsgId = v_currentMsgID.
If MSGID coming from table is 1300
all variables are zero initially.
so the target will be something like below:-
MSGID = 1301 , v_rowcount = 1 , v_prevMsgId = 1301 for first row.
MSGID = 1301 , v_rowcount = 2 , v_prevMsgId = 1301 for second row till 24999
MSGID = 1301 , v_rowcount = 25000 , v_prevMsgId = 1301 for 25000th row
MSGID = 1302 , v_rowcount = 1 , v_prevMsgId = 1302 -- for 25001 row
As in BODS; I am thinking to use while loop for the same and do these assignments in Script. Please suggest some way?
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.