>Hi George,
>
>Although I understand your point, the creation of this SQL statement is based on a many selections previously made by the users.
Hi Juan,
Maybe I'm being "thick" here, but I don't where that would make a difference, at least from what I saw of your example. Even though tables are open explictedly by an SQL statement, I've always (going back to 2.0) found it easier to take care of this chore myself. I think it gives me more control. I have a custom class that does this type of stuff for me, all I have to do is pass it the table name, and optionally, alias to be used and the purpose, and it takes care of the rest. This way if, for any reason, the operation can't be completed, the user gets a message meaningful to the context.
George
Ubi caritas et amor, deus ibi est