Forum Discussion
Semei770
May 06, 2024Copper Contributor
Help with code
I have this code in oracle if (Income == "NULL") {0} else if (Emplid == Prior(Emplid) && Income != Prior(Income)) {1} else if (Emplid != Prior(Emplid) && Income != "Unreported") {1} else {0} ...
Semei770
Copper Contributor
Thank you olafhelper
Here is an image about what result I need it
Emplid | Term | IncomeYY | Count_Income |
1 | 2213 | Unreported | 0 |
1 | 2237 | $35,000 or More | 1 |
1 | 2237 | $35,000 or More | 0 |
1 | 2243 | Unreported | 0 |
1 | 2243 | $35,000 or More | 1 |
1 | 2245 | Unreported | 0 |
olafhelper
May 21, 2024Bronze Contributor
Here is an image about what result I need it
Fine,m and what is the source data?
Again, please post table design as DDL, some sample data as DML statement and the expected result.