Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
johnan
Creator III
Creator III

aggr on resident

Hi all,

Got this problem that each of the calculated below in script:

Load
Count(if(TillAISL >='101' and TillAISL <200,(TillAISL))) as [PAF1],
Count(if(TillAISL >='200' and TillAISL <300,(TillAISL))) as [PAF2],
Count(if(TillAISL >='300' and TillAISL <400,(TillAISL))) as [PAF3],
Count(if(TillAISL >='400' and TillAISL <500,(TillAISL))) as [PAF4],
Count(if(TillAISL >='500' and TillAISL <600,(TillAISL))) as [PAF5],
Count(if(TillAISL >='600' and TillAISL <700,(TillAISL))) as [PAF6]
Resident WRPAB;

The thing is that i must do it for each order from the table WRPAB so i got this calculated per [PAF_KEY]
The key is RSPPLN &'-'& RSTASL &'-'& RSTBAY &'-'& RSTLVL as [PAF_KEY], from table WRPAB

Just now it's calculated as total and not depending order and i think i must use aggr?

Br

John

 

Labels (1)
1 Reply
johnan
Creator III
Creator III
Author

I figured it out 🙂

In script:

if(RSTASL >='101' and RSTASL <200,(1)) as [PAF1],
if(RSTASL >='200' and RSTASL <300,(1)) as [PAF2],
if(RSTASL >='300' and RSTASL <400,(1)) as [PAF3],
if(RSTASL >='400' and RSTASL <500,(1)) as [PAF4],
if(RSTASL >='500' and RSTASL <600,(1)) as [PAF5],
if(RSTASL >='600' and RSTASL <700,(1)) as [PAF6],