Is this the best way to have dynamic querys? If I have something like this: select TBL.field1, TBL.field2, TBL.field3, TBL.field4, TBL.field5, TBL.field6, TBL.field7, TBL.field8, TBL.field9from(select field1, field2, field3, field4, field5, field6, field7, field8, field9from view_1where $P{P_Report_Type} = 1unionselect field1, field2, field3, field4, field5, field6, field7, field8, field9from view_2where $P{P_Report_Type} = 2 ) tblwhere $P{P_Info_Type } = 1and tbl.field2 = $P{P_xx} and tbl.field3 = $P{P_yy} and tbl.field1 = $P{P_zz}[/code] I'll have to have this repeated for all values for P{P_Info_Type}? In my case 8 times. Isnt' there a best way? Thank you for the help,Siul19981