You cannot do this. Here is a sort-of-close method:
select ab.*
from ((select a.*
from stockA a
where @location = 'location A'
) union all
(select b.*
from stockB b
where @location = 'location B'
)
) ab