Qualify Object Names - Not working for WHERE arguments

TomLTomL Posts: 13 Bronze 2
Hi,

I have a strange behaviour from Qualify Object Names.
When I use Qualify Object Names, it sometimes not working for the WHERE arguments.

I could break it down to following sample:

CREATE TABLE #temptable
(
    id INT,
    test NVARCHAR(15)
);
INSERT INTO #temptable
VALUES
(N'test');

SELECT t1.test
FROM #temptable t1
WHERE test = 'test';

DROP TABLE #temptable;

Nothing changes, when I try to qualify it. I would expect that
WHERE test = 'test' changes to WHERE t1.test = 'test'

If I comment the line with '-- id INT,', the qualify actually works.

Is this a bug, or is it a local formatting setting on my side?
I am using SSMS 18.4 and SQL Prompt 10.0.6.13013

Best regards
Tom
Tagged:

Best Answer

  • KarlBKarlB Posts: 20 Bronze 3
    Hi Tom.

    Okay so I have some good news! The work behind this is ready and is targeted to be released either this Wednesday 5th Feb or next Wednesday 12th Feb.

    Just wanted to share the latest with you and give you an expectation for when you will see this added.
    Kind regards
    Karl Boldy | Redgate Software
    Have you visited our Help Center?

Answers

  • KarlBKarlB Posts: 20 Bronze 3
    edited January 9, 2020 1:48PM
    Hi Tom,

    Thanks for highlighting this one and for the good detail and steps you have provided. It is strange behavior indeed and I have been able to replicate this using the same SSMS and SQL Prompt versions you are using.

    This has been referred to our developers internally so that they can review and provide further feedback.

    Good to know that you are able to comment out and continue as per your instructions in the mean time.

    Kind regards
    Karl Boldy | Redgate Software
    Have you visited our Help Center?
  • Hi Tom,

    Just to keep you updated, our development team have taken this on to fix, I'll keep track of it and let you know the outcome.

    Kind regards
    Karl Boldy | Redgate Software
    Have you visited our Help Center?
  • TomLTomL Posts: 13 Bronze 2
    Hi Karl,

    I really appreciate for keeping me updated.
    Hopefully they can fix it, somehow it happens a few times during a day.

    Best regards
    Tom
  • Hi Tom,

    No new update just yet I'm afraid, this one is with the developers currently. Will keep you posted.
    Kind regards
    Karl Boldy | Redgate Software
    Have you visited our Help Center?
  • TomLTomL Posts: 13 Bronze 2
    Hi Karl,

    no rush there. I know people can be busy and sometimes it's also difficult to track down the real problem.
  • TomLTomL Posts: 13 Bronze 2
    Hi Karl,

    I've already installed the update and it is working now.

    Thank you so much for your help and support during the whole process.
    I really appreciate it!

    Have a good day!
    Tom
Sign In or Register to comment.