Hello, I am new programming in PL, and I have some problems. These is the idea: I want to make a query that returns a number of records from a single field and recording them in a variable . I can do these with a "select into" to record in a variable. After that, for each value of that query I want to make another select, and in the where put the variable of the other select and that the query returns some fields. I know that I could make these generating the results of the first query inside an auxiliary table the results of the first query and then use them in the second select, but I won't do it without auxiliary tables. How could I do these? Many Thanks and sorry for my English!