It's possible to execute SLQ CURSOR on Advanced Queries?

It's possible to execute SLQ CURSOR on Advanced Queries?

  
Hi guys,

Has anyone ever tried to use SLQ CURSOR on Advanced Queries? I'm trying to iterate a parameter (Fetch_Status), but I'm getting an error: "Database returned following error: Error in advanced query. Must declare the variable "@@qpinFetch_Status."

Thanks,

André Siébra