Why Error: ambiguous column name: ProjID

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Why Error: ambiguous column name: ProjID

Jose Isaias Cabrera-4

This SQL,

    SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a
    LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID
    LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS
    LEFT JOIN Business_OBS_List AS d ON a.Business_OBS = d.Bus_OBS
    WHERE ProjID IN
    (
      SELECT ProjID FROM Master_Project_List WHERE ProjID = 'PR0000011894'
    )

  ORDER BY ProjID;

is returning the error,

Error: ambiguous column name: ProjID

using SQLite version 3.26.0 2018-12-01 12:34:55.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Why Error: ambiguous column name: ProjID

Jose Isaias Cabrera-4

Never mind.  Sorry guys for the wasted bandwidth.


________________________________
From: sqlite-users <[hidden email]> on behalf of Jose Isaias Cabrera <[hidden email]>
Sent: Monday, February 11, 2019 11:16 AM
To: [hidden email]
Subject: [sqlite] Why Error: ambiguous column name: ProjID


This SQL,

    SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a
    LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID
    LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS
    LEFT JOIN Business_OBS_List AS d ON a.Business_OBS = d.Bus_OBS
    WHERE ProjID IN
    (
      SELECT ProjID FROM Master_Project_List WHERE ProjID = 'PR0000011894'
    )

  ORDER BY ProjID;

is returning the error,

Error: ambiguous column name: ProjID

using SQLite version 3.26.0 2018-12-01 12:34:55.

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Why Error: ambiguous column name: ProjID

J. King-3
In reply to this post by Jose Isaias Cabrera-4
On February 11, 2019 11:16:32 AM EST, Jose Isaias Cabrera <[hidden email]> wrote:

>
>This SQL,
>
>    SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a
>    LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID
>    LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS
>    LEFT JOIN Business_OBS_List AS d ON a.Business_OBS = d.Bus_OBS
>    WHERE ProjID IN
>    (
>   SELECT ProjID FROM Master_Project_List WHERE ProjID = 'PR0000011894'
>    )
>
>  ORDER BY ProjID;
>
>is returning the error,
>
>Error: ambiguous column name: ProjID
>
>using SQLite version 3.26.0 2018-12-01 12:34:55.
>
>_______________________________________________
>sqlite-users mailing list
>[hidden email]
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

"...WHERE ProjID IN..."

Which ProjID, a or b?
--
J. King
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Why Error: ambiguous column name: ProjID

Jose Isaias Cabrera-4

J. King, on Monday, February 11, 2019 11:25 AM, wrote...

>On February 11, 2019 11:16:32 AM EST, Jose Isaias Cabrera <[hidden email]> wrote:
>>
>>This SQL,
>>
>>    SELECT a.*,b.*,c.Area,d.Bus_Area FROM Master_Project_List AS a
>>    LEFT JOIN Master_Project_List_Extra AS b ON a.ProjID = b.ProjID
>>    LEFT JOIN Bus_IT_Areas_ORGs AS c ON a.IT_OBS = c.IT_OBS
>>    LEFT JOIN Business_OBS_List AS d ON a.Business_OBS = d.Bus_OBS
>>    WHERE ProjID IN
>>    (
>>   SELECT ProjID FROM Master_Project_List WHERE ProjID = 'PR0000011894'
>>    )
>>
>>  ORDER BY ProjID;
>>
>>is returning the error,
>>
>>Error: ambiguous column name: ProjID
>>
>>using SQLite version 3.26.0 2018-12-01 12:34:55.
>
>"...WHERE ProjID IN..."
>
>Which ProjID, a or b?

Thanks.  Yes, sometimes I should revise 3 or 4 times before asking. :-)  As soon as I sent it, I figured it out.  Thanks.

josé

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Why Error: ambiguous column name: ProjID

Simon Slavin-3
On 11 Feb 2019, at 4:51pm, Jose Isaias Cabrera <[hidden email]> wrote:

> Thanks.  Yes, sometimes I should revise 3 or 4 times before asking. :-)  As soon as I sent it, I figured it out.

It wouldn't help.  You can read it ten time, rewrite it three times, and explain it to your pet duck.  You still won't figure out the answer until you hit 'send'.  It's called "the magic of posting".

Glad you figured it out.

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Why Error: ambiguous column name: ProjID

Jose Isaias Cabrera-4

Simon Slavin, on Monday, February 11, 2019 11:53 AM, wrote...
>On 11 Feb 2019, at 4:51pm, Jose Isaias Cabrera <[hidden email]> wrote:
>
>> Thanks.  Yes, sometimes I should revise 3 or 4 times before asking. :-)  As
>> soon as I sent it, I figured it out.
>
>It wouldn't help.  You can read it ten time, rewrite it three times, and explain
> it to your pet duck.  You still won't figure out the answer until you hit 'send'.
> It's called "the magic of posting".
True. :-)

>Glad you figured it out.
Thanks.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users