On Wednesday, March 27, 2002, at 04:00  PM, Daniel Ferreira Castro wrote:

> I want to select the fields nome,id_proj,arquivo FROM ALGORITMO and
> ATAS.  But when I use the query below, I receive the error "ERROR 1052:
> Column: 'nome' in field list is ambiguous".  What is wrong on my query?
>
> query: SELECT nome,id_proj,arquivo FROM ALGORITMO,ATAS WHERE id_proj=0
> AND eng=1 OR nome="teste"  OR nome="de"  OR nome="parse";

Daniel, try specifying which table you want the 'nome' column to be used 
in -- the ambiguous part is that many of the tables you are selecting 
FROM have a 'nome' column.  Do it like this:

SELECT ALGORITMO.nome,
        ALGORITMO.id_proj,
        ATAS.arquivo
FROM   ALGORITMO,
        ATAS
WHERE  ALGORITMO.id_proj=0
AND    ALGORITMO.eng=1
OR     ALGORITMO.nome="teste"
OR     ATAS.nome="de"
OR     ATAS.nome="parse";

Obviously, I have no idea how you want your query to look, so be sure to 
customize it for your needs, but this demonstrates what you need to do: 
Explicitly state the table whose column you want to access.


Erik




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to