1

I get this error 'ERROR: column reference is ambiguous Position. Error Code 6BF19D1C' running the next query on Tableau for mac on PostgreSQL 15.2

SELECT *
FROM magasin
  join ville_mag
    on magasin.ville = ville_mag.ville
  join vente_bonbon
    on magasin.nom_site = vente_bonbon.nom_site

But this query works fine in admin panel or VSCode connected to that DB. Ass well i tried other join types and put semicolon at the end but nothing helped

  • If the columns being joined have incompatible data types or if there are no matching values in the tables, the query may return unexpected results or errors. – LedgerTech Mar 31 '23 at 22:18
  • but how does the same query works from admin panel? in the case what you're talking about should be error happed anyway. But the error occurs in Tableau only – Leila Nikonova Mar 31 '23 at 22:20

1 Answers1

1

Seems like that is a bug and I found a workaround: instead of * operator we need to spread all needed columns in select query

so final solution will be like this:

SELECT magasin.nom_site,
       responsable,
       adresse,
       code_postal,
       magasin.ville,
       libelle,
       departement,
       id_vente,
       nombre,
       poids,
       ca,
       nom,
       mois
FROM magasin
    join ville_mag
        on magasin.ville = ville_mag.ville
    join vente_bonbon
        on magasin.nom_site = vente_bonbon.nom_site