How can we help you today? How can we help you today?

Qualify object names on table valued function - bug

Hi,
When I'm qualifying object names (CTRL+B, CTRL+Q)
on query that has clause and table valued function with already qualified object names - table alias get removed, e.g:

SELECT      c.Res
FROM        person AS p
CROSS APPLY My_DB.dbo.fn_bla(p.column_name) AS c

Becomes:

SELECT      c.Res
FROM        person AS p
CROSS APPLY My_DB.dbo.fn_bla(column_name) AS c

Happens with all members of my team as well.
Using version 9.4.1

Thanks.

maddoc
0

Comments

6 comments

  • Russell D
    This is now fixed in the latest release: https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_9.4.1.6962.exe. Please update and let me know if you have any issues.
    Russell D
    0
  • maddoc
    Russell D said:
    This is now fixed in the latest release: https://download.red-gate.com/checkforupdates/SQLPrompt/SQLPrompt_9.4.1.6962.exe. Please update and let me know if you have any issues.
    Installed SQLPrompt_9.4.1.6962
    The problem is not fixed.
    maddoc
    0
  • Russell D
    This now works fine for me on 9.4.1. What version of SQL are you using?
    Russell D
    0
  • maddoc
    SQL Server 2016 sp2 cu1
    SSMS 17.9

    Example with WideWorldImporters database:

    SELECT      dca.AccessResult
    FROM        Application.Cities AS this_alias
    CROSS APPLY Application.DetermineCustomerAccess(this_alias.CityID) AS dca

    Becomes:

    SELECT      dca.AccessResult
    FROM        Application.Cities AS this_alias
    CROSS APPLY Application.DetermineCustomerAccess(CityID) AS dca






    maddoc
    0
  • maddoc
    Any news with that?
    The bug is still present in latest version (9.4.9)


    maddoc
    0
  • Buddy
    I also am seeing the bug in version 9.4.9.7873
    I am using SSMS v 14.0.17289.0

    Before formatting
    OUTER APPLY dbo.fnCheckIsProshipDlvmode (JS.DATAAREAID, LI.DLVMODE) AS psA
    After formatting
    OUTER APPLY dbo.fnCheckIsProshipDlvmode (JS.DATAAREAID, DLVMODE) AS psA
    on this function with two parameters it is only removing the qualifier on parameter 2
    Buddy
    0

Add comment

Please sign in to leave a comment.