join with duplicate column nnames in both tables

Questions related to using nuBuilder Forte.

join with duplicate column nnames in both tables

Unread postby sputs » Wed Apr 14, 2021 7:52 am

Hi,

I am trying to execute this query that runs fine in mysql:

Code: Select all
SELECT states.*,
               countries.name AS name_country
FROM states
JOIN countries ON states.country_id = countries.id

I have figured out that the join statement is causing issues in nubuilder (but not in mysql). Both tables have a column called id. I suspect this is the issue. I am not able to change the names because this is tied to lots of other apps.

Anyone have any ideas on what I could try to get this working?
Last edited by kev1n on Wed Apr 14, 2021 9:31 am, edited 1 time in total.
Reason: Added Code tags.
sputs
 
Posts: 5
Joined: Mon Feb 08, 2021 4:37 am

Re: join with duplicate column nnames in both tables

Unread postby kev1n » Wed Apr 14, 2021 7:54 am

Hi,

Check out this thread:

viewtopic.php?f=19&t=10948&p=23803
kev1n
nuBuilder Team
 
Posts: 1705
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: join with duplicate column nnames in both tables

Unread postby sputs » Fri Apr 16, 2021 1:41 am

Thank Kevin! Will likely solve it.
sputs
 
Posts: 5
Joined: Mon Feb 08, 2021 4:37 am


Return to General

Who is online

Users browsing this forum: No registered users and 17 guests

cron