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} ...
olafhelper
May 07, 2024Bronze Contributor
"Does not work" means what in detail? That's really to less on information.
Please post table design as DDL, some sample data as DML statement and the expected result.
Please post table design as DDL, some sample data as DML statement and the expected result.
Semei770
May 17, 2024Copper 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 |
- olafhelperMay 21, 2024Bronze Contributor
Here is an image about what result I need itFine,m and what is the source data?
Again, please post table design as DDL, some sample data as DML statement and the expected result.