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

Filtered Columns in Candidate List When Alias Used

If I type the following query:

SELECT *
FROM tblPage P
INNER JOIN tblPagePanel PP ON (P.nPageID = PP.nPageID)nPageID)
INNER JOIN tblPanel PNL ON (PP.n

I get the candidate list with the columns that begin with the letter "n". But instead of only getting the columns that start with the letter "n" that are the in tblPagePagel table (note the PP alias) I get ALL the columns that start with the letter "n" between all three tables used in this query even though I am using the PP alias for tblPagePanel.
johnw
0

Comments

4 comments

  • johnw
    Oh and notice the line

    INNER JOIN tblPagePanel PP ON (P.nPageID = PP.nPageID)nPageID)

    the "nPageID)" was added by SQLPrompt because the candidate list opened when I typed the closing parentheses. I then hit the Enter key to go to the next line and SQLPrompt inserted the first item in the now open candidate list which was "nPageID".
    johnw
    0
  • Tilman
    Hi,
    If I type the following query:

    SELECT *
    FROM tblPage P
    INNER JOIN tblPagePanel PP ON (P.nPageID = PP.nPageID)nPageID)
    INNER JOIN tblPanel PNL ON (PP.n

    I get the candidate list with the columns that begin with the letter "n". But instead of only getting the columns that start with the letter "n" that are the in tblPagePagel table (note the PP alias) I get ALL the columns that start with the letter "n" between all three tables used in this query even though I am using the PP alias for tblPagePanel.
    Have you enabled 'Show objects for specified owner or schema' on the Options dialog and refreshed the cached database?

    Regards,

    Tilman
    Tilman
    0
  • johnw
    Yes it is checked
    johnw
    0
  • Tilman
    Silly me... Actually that option has nothing to do with qualifying by a table, it just affects schemas and users. Qualifying by tables should work always.

    I can reproduce your problem when I have the 'nPageID)' bit, i.e. when it's invalid SQL. When I remove that it bit it works fine for me.

    Tilman
    Tilman
    0

Add comment

Please sign in to leave a comment.