auto table alias in subquery sometimes doesnt work

spingeespingee Posts: 2
edited March 7, 2016 11:04PM in SQL Prompt
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+'-%'))

Comments

  • I've followed up with you via email, below is a transcript:

    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,
    Andrew Pierce
    Technical Sales Engineer
    Redgate Software
Sign In or Register to comment.