Error FIX: Column Name Appears More Than Once In Result Column

Okay, so I kept getting this error and it finally dawned on me that it means exactly what it says, lol. I was trying to run a stored procedure and had a query where the name field was selected twice like this:

SELECT, A.address,,, FROM members M inner join address A on =;

Silly me. Removing the duplicate field or giving it an alias solves the problem.

You may also like...

3 Responses

  1. B says:

    thanks heaps… although still looking can’t see 2 columns with the same name

  2. B says:

    hehe found it!

  3. Jade says:

    Sometimes it also happens if you’re joining two tables that have the same column and you’re not running a natural join. For instance if you did something like:

    SELECT A.*, B.* FROM address A LEFT OUTER JOIN badaddress B

    If A and B both have a field with the same name you’ll have the same problem.

Leave a Reply