How to concatenate multiple range from projTable

How to concatenate multiple range from projTable. Just use simple code here.

 static void concatenatemultipleRange(Args _args)  
 {  
 ProjTable ProjTable1;  
 QueryBuildDataSource qbds;  
 Query q = new Query();  
 queryRun queryRun1;  
 str range;  
 str 20 InventId;  
 ProjTable ProjTable2;  
 QueryBuildDataSource qbds1;  
 Query q1 = new Query();  
 queryRun queryRun2;  
 ProjTable ProjTable3;  
 QueryBuildDataSource qbds2;  
 Query q2 = new Query();  
 queryRun queryRun3;  
 date startdate;  
 ;  
 startdate = str2date('31/07/2010',123);  
 range = '';  
 q = new Query();  
 qbds = q.addDataSource(tablenum(ProjTable));  
 // dimensionRange = ProjTable_ds.query().dataSourceTable(TableNum(ProjTable)).addRange(FieldId2Ext(FieldNum(ProjTable, Dimension),2));  
 qbds.addRange(FieldId2Ext(FieldNum(ProjTable, Dimension),2)).value('');  
 qbds.addRange(fieldNum(ProjTable, Created)).value(strFmt('((Created >= %1)', date2StrXpp(startdate)));  
 qbds.addSelectionField(fieldnum(ProjTable, recid));  
 queryRun1 = new queryRun(q);  
 while(queryRun1.next())  
 {  
 ProjTable1 = queryRun1.get(tablenum(ProjTable));  
 range = queryRangeConcat(range, ProjTable1.RecId);  
 }  
 /////////////////////////  
 q1 = new Query();  
 qbds1 = q1.addDataSource(tablenum(ProjTable));  
 qbds1.addRange(FieldId2Ext(FieldNum(ProjTable, Dimension),2)).value(querynotvalue(''));  
 queryRun2 = new queryRun(q1);  
 while(queryRun2.next())  
 {  
 ProjTable2 = queryRun1.get(tablenum(ProjTable));  
 range = queryRangeConcat(range, ProjTable2.RecId);  
 }  
 ////////////////////////////  
 q2 = new Query();  
 qbds2 = q2.addDataSource(tablenum(ProjTable));  
 qbds2.addRange(fieldnum(ProjTable, recid)).value(range);  
 queryRun2 = new queryRun(q2);  
 while(queryRun2.next())  
 {  
 ProjTable3 = queryRun1.get(tablenum(ProjTable));  
 // info(ProjTable3.Created);  
 }  
 InventId = '';  
 while select * from ProjTable1 where (ProjTable1.Created < startdate && ProjTable1.Dimension()  
 {  
 }  
 }