auto table alias in subquery sometimes doesnt work
spingee
Posts: 2
i have latest version.
It happen randomly and i couldnt find pattern to reproduce (i also dont have time for this), but its really annoying
As example:
In first subquery i got No alias for dbo.locality_table but i got it in second (both subqueries is identical)
update vpt
set vpt.pool_status_id = 2
from dbo.vrf_pool_table vpt
join dbo.vrf_customer_table as vct on vct.vrf_name = vpt.vrf_name
where vpt.pool_status_id = 3
and not exists (select *
from v_locality_hardware vlh
join dbo.locality_table -- NO ALIAS GENERATED
where lt.customer_id = vct.customer_id
hw_name like (@l_vrf_name+'-%')
)
and not exists(select *
from v_locality_hardware vlh
join dbo.locality_table as lt2 -- ALIAS GENERATED
where lt.customer_id = vct.customer_id
hw_name like (@l_vrf_name+'-%'))
It happen randomly and i couldnt find pattern to reproduce (i also dont have time for this), but its really annoying
As example:
In first subquery i got No alias for dbo.locality_table but i got it in second (both subqueries is identical)
update vpt
set vpt.pool_status_id = 2
from dbo.vrf_pool_table vpt
join dbo.vrf_customer_table as vct on vct.vrf_name = vpt.vrf_name
where vpt.pool_status_id = 3
and not exists (select *
from v_locality_hardware vlh
join dbo.locality_table -- NO ALIAS GENERATED
where lt.customer_id = vct.customer_id
hw_name like (@l_vrf_name+'-%')
)
and not exists(select *
from v_locality_hardware vlh
join dbo.locality_table as lt2 -- ALIAS GENERATED
where lt.customer_id = vct.customer_id
hw_name like (@l_vrf_name+'-%'))
Comments
Thanks for contacting us and sorry you are having this issue!
Next time you get this issue could you send in a screenshot as well as the latest log from ``C:Users%Username%AppDataLocalRed GateLogsSQL Prompt 7``
Feel free to reply back at your convenience!
Warmly,
Technical Sales Engineer
Redgate Software