Error "unknown column usr_id1 in field list" where usr_id1 is an alias generated by dbForge

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
aoagroup
Posts: 2
Joined: Thu 29 Aug 2013 07:29

Error "unknown column usr_id1 in field list" where usr_id1 is an alias generated by dbForge

Post by aoagroup » Thu 29 Aug 2013 07:35

I am currently running version 6.0.441.

When running the query below, dbForge generates a temporary alias "usr_id1" for column 4 "employment.usr_id" because column 4 has the same name as column 1.

Code: Select all

SELECT
  usr.usr_id,
  usr.name,
  usr.email,
  employment.usr_id,
  employment.title
FROM usr
  LEFT OUTER JOIN employment
    ON usr.usr_id = employment.usr_id
I update the column "employment.title" and submit the update. The update itself is fine but it generates an error "unknown column usr_id1 in field list" when retrieving the row data because dbForge uses the temporary alias `usr_id1` instead of `usr_id` in the query.

Code: Select all

UPDATE `company`.`employment` SET `title` = :p1 WHERE (((:p2 = 1 AND `usr_id` IS NULL) OR (`usr_id` = :p3)));
SELECT `usr_id1`, `title` FROM `company`.`employment` WHERE `usr_id` = :p3 AND `title` = :p1
Parameters: 
	p1: Office Assistant
	p2: 0
	p3: 12345
Thanks in advance :wink:

aoagroup
Posts: 2
Joined: Thu 29 Aug 2013 07:29

Re: Error "unknown column usr_id1 in field list" where usr_id1 is an alias generated by dbForge

Post by aoagroup » Fri 30 Aug 2013 01:48

Received reply from dbForge Support and the bug will be fixed in one of the next builds.

alexa

Re: Error "unknown column usr_id1 in field list" where usr_id1 is an alias generated by dbForge

Post by alexa » Fri 30 Aug 2013 11:04

We were able to reproduce this issue and will fix it in one of the next builds of dbForge Studio for MySQL. We will notify you once it's available for downloading.

Post Reply