Though to be safe you should be quoting MT and ST with quote_ident()
before putting them into a dynamic statement.
Cheers
BJ
On Feb 12, 2008 4:38 PM, Brett McBride <brett(at)deakin(dot)edu(dot)au> wrote:
> you could do this with 'execute' like so:
>
> execute 'select count(*) into count1 from ' || MT || ',' || ST || '
> where ' || MT || '.phonenumber= ' || ST || '.phonenumber' into v_variable;
>
> brett