I am trying to rewrite a SQL statement that was previously written with a (with) at the beginning of it. I am using PowerBuilder 12.5 and this behind a datawindow. The query is calling temp tables and I want to use a view instead. I am not sure what needs to be done. Can anyone give assistance? I have attached the with statement. I have never dealt with this kind of statement before.