I have written a SQL query and if I run it as code, it works fine, but when I create a view and want to use it, the view creates an endless loop! Why? IT SHOULD BE A REPORT<