Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I Have One Table having 4 fields like Plant, prod_hier, date, Amount see the below table
| PLANT | PROD_HIER | DATE | Amount |
| 3201 | 1 | 01-04-2014 | 1000 |
| 3211 | 2 | 02-04-2014 | 2000 |
| 3221 | 3 | 03-04-2014 | 3000 |
| 3231 | 4 | 04-04-2014 | 4000 |
| 3241 | 5 | 05-04-2014 | 5000 |
| 3251 | 6 | 06-04-2014 | 6000 |
| 3261 | 7 | 07-04-2014 | 7000 |
| 3271 | 8 | 08-04-2014 | 8000 |
| 3281 | 9 | 09-04-2014 | 9000 |
| 3291 | 10 | 10-04-2014 | 10000 |
| 4201 | 1 | 01-04-2014 | 1000 |
| 4211 | 2 | 02-04-2014 | 2000 |
| 4221 | 3 | 03-04-2014 | 3000 |
| 4231 | 4 | 04-04-2014 | 4000 |
| 4241 | 5 | 05-04-2014 | 5000 |
| 4251 | 11 | 16-04-2014 | 6000 |
| 4261 | 12 | 17-04-2014 | 7000 |
| 4271 | 13 | 18-04-2014 | 8000 |
| 4281 | 14 | 19-04-2014 | 9000 |
| 4291 | 10 | 10-04-2014 | 10000 |
My Question is PROD_HIER contains 2 equal 1's i want to display in PROD_HIER field 2 equal 1's as well as Plant field
plant prod_hier
3201 1
4201 1
as well as what is Greater than and Less Than of Plant used by prod_hier
Please explain more about the requirement with an example.
Hi,
I can’t see what you want to achieve. Do you want to keep only
2 values in the column/field Plant?
Can you please add how the final table result (needed table
result) looks like?
/joseph
Please explain more about the requirement with an example.
FROM THE GIVEN TABLE
PLANT PROD_HIER DATE AMOUNT
| PLANT | PROD_HIER | DATE | Amount |
| 3201 | 1 | 01-04-2014 | 1000 |
| 3211 | 2 | 02-04-2014 | 2000 |
| 3221 | 3 | 03-04-2014 | 3000 |
| 3231 | 4 | 04-04-2014 | 4000 |
| 3241 | 5 | 05-04-2014 | 5000 |
| 3251 | 6 | 06-04-2014 | 6000 |
| 3261 | 7 | 07-04-2014 | 7000 |
| 3271 | 8 | 08-04-2014 | 8000 |
| 3281 | 9 | 09-04-2014 | 9000 |
| 3291 | 10 | 10-04-2014 | 10000 |
| 4201 | 1 | 01-04-2014 | 1000 |
| 4211 | 2 | 02-04-2014 | 2000 |
| 4221 | 3 | 03-04-2014 | 3000 |
| 4231 | 4 | 04-04-2014 | 4000 |
| 4241 | 5 | 05-04-2014 | 5000 |
| 4251 | 11 | 16-04-2014 | 6000 |
| 4261 | 12 | 17-04-2014 | 7000 |
| 4271 | 13 | 18-04-2014 | 8000 |
| 4281 | 14 | 19-04-2014 | 9000 |
| 4291 | 10 | 10-04-2014 | 10000 |
I WANT TO DISPLAY LIKE THIS
| PLANT | PROD_HIER | DATE | Amount |
| 3201 | 1 | 01-04-2014 | 1000 |
| 4201 | 1 | 01-04-2014 | 1000 |
AND WHICH ONE IS 'GREATER THAN' OR 'LESS THAN' IN PLANT USING PROD_HIER
Still not clear in which condition the below data shown.
| PLANT | PROD_HIER | DATE | Amount |
| 3201 | 1 | 01-04-2014 | 1000 |
| 4201 | 1 | 01-04-2014 | 1000 |
Thanks
condition is ''if i click 1 i wanna show highest value of PLANT field''
condition is ''if i click 1 i wanna show highest value of PLANT field'' and i wanna add new field is highest column based on PROD_HIER
| PLANT | PROD_HIER | DATE | Amount |
| 3201 | 1 | 01-04-2014 | 1000 |
| 4201 | 1 | 01-04-2014 | 1000 |
Finally i wanna display below given table
Once again the condition is highest value of the PLANT field based on PROD_HIER
plant prod_hier date Amount higher new field
3201 1 01-04-2014 1000 4201
Thanks
condition is ''if i click 1 i wanna show highest value of PLANT field'' based on PROD_HIER and i wanna add new field is highest column i.e 4201
| PLANT | PROD_HIER | DATE | Amount |
| 3201 | 1 | 01-04-2014 | 1000 |
| 4201 | 1 | 01-04-2014 | 1000 |
Finally i wanna display below given table
Once again the condition is highest value of the PLANT field based on PROD_HIER
plant prod_hier date Amount higher new field
3201 1 01-04-2014 1000 4201
Thanks