Skip to content
Advertisement

Query returning multiple values for the same column?

I am running a simple query and asking to return the same column from the same table twice. For some reason, the column returns with two different results. Can someone please explain why and show me how to ask the query to return consistent results twice?

Here is the code I am running:

Thank you in advance.

Advertisement

Answer

By adding the same table twice to your query is similar to doing a full outer join, you are joining the table against itself, the where clauses make things harder to figure it out, just call the query without any filter to understand the effect of the query calling the same table twice.

From this point you should be able to accomplish what you are looking for.

OR

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement