Mauri Sahlberg <[EMAIL PROTECTED]> writes: > If the following is executed in context, where the dynamic query returns > data with every iteration everythin goes fine. If the the dynamic query > returns nothing - bush becomes null and everything fails. I do not > undestand why bush becomes null when the query returns nothing.
If "latest" is null then the result of the series of concatenations is also null. Perhaps what you really want is to assign to "latest" inside the inner FOR-loop. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly