Changeset 47

Show
Ignore:
Timestamp:
06/22/10 20:36:38 (2 years ago)
Author:
larry.grey
Message:

Updated to loop through all queries with a prefix of "GS"

Location:
projects/updatetreeeffdtinqry/trunk/defn/ApplicationEnginePrograms/GS/GS_QRYEFFDT
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • projects/updatetreeeffdtinqry/trunk/defn/ApplicationEnginePrograms/GS/GS_QRYEFFDT/GS_QRYEFFDT.MAIN.GBL.default.1900-01-01.Step01.OnExecute.pcdefn.peoplecode

    r46 r47  
    5151Local ApiObject &MyQuery, &MySession, &CriteriaCollection; 
    5252Local ApiObject &CurrentCriteria; 
     53Local string &QryToProcess; 
    5354Local number &i; 
    5455 
     
    5960   &MyQuery = &MySession.getquery(); 
    6061    
    61    &MyQuery.open("GS_JRNLS_MY_DEPT", True, True); 
    62     
    63    Warning ("Just Opened Query " | &MyQuery.name | ", " | &MyQuery.description); 
    64     
    65    &CriteriaCollection = &MyQuery.queryselect.criteria; 
    66     
    67    For &i = 1 To &CriteriaCollection.count; 
     62   Local SQL &sqlGetQueries = CreateSQL("select QRYNAME from PSQRYDEFN where QRYNAME like 'GS%'"); 
     63   While &sqlGetQueries.Fetch(&QryToProcess) 
    6864       
    69       ProcessCriterion(&CriteriaCollection.item(&i), &i); 
     65      &MyQuery.open(&QryToProcess, True, True); 
    7066       
    71    End-For; 
    72     
    73    &MyQuery.save(); 
     67      Warning ("Just Opened Query " | &MyQuery.name | ", " | &MyQuery.description); 
     68       
     69      &CriteriaCollection = &MyQuery.queryselect.criteria; 
     70       
     71      For &i = 1 To &CriteriaCollection.count; 
     72          
     73         ProcessCriterion(&CriteriaCollection.item(&i), &i); 
     74          
     75      End-For; 
     76       
     77      &MyQuery.save(); 
     78      &MyQuery.close(); 
     79       
     80   End-While; 
    7481    
    7582End-If;