Rank: Newbie
Groups: Registered
Joined: 1/7/2018(UTC) Posts: 2
|
Hi all. I hope I am posting this in the right place - it is my first post and I'm just experimenting with Seal Report. I have created a data source that points to a MySQL Database, and created a very quick first test report. I get the following error when I try to execute the report 9:31:21 AM Error in model 'model': Unexpected error when executing the following SQL statement: SELECT DISTINCT all_people_20180105.[Email Address] AS C0, all_people_20180105.[First Name] AS C1, all_people_20180105.[Last Name] AS C2 FROM all_people_20180105 ORDER BY all_people_20180105.[Email Address] ASC,all_people_20180105.[First Name] ASC,all_people_20180105.[Last Name] ASC
Error detail: ERROR [42000] [MySQL][ODBC 5.3(w) Driver][mysqld-5.7.20-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[Email Address] AS C0, all_people_20180105.[First Name] AS C1, all_people_' at line 2
MySql wants to handle columns with spaces in the names with reverse quotes `<field name>` rather than [<field name>]. I'm assuming I've missed something blindingly obvious here? Cheers Jo
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 12/20/2013(UTC) Posts: 1,209 Thanks: 14 times Was thanked: 206 time(s) in 199 post(s)
|
Yes, it looks like a small adjustment to be made in the Wizard that creates the column for MySQL databases... I wonder if this depends on MySQL version as [] is normally standard for Ansi SQL.
I would recommend to edit you columns manually with the Server Manager and replace the [] by '' to make it works, since this feature is fixed.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 1/7/2018(UTC) Posts: 2
|
EPF, that is a fine solution for a small report, but not much use in a more complex environment. I admit to being surprised by the use of the `` as a column identifier (and I'm not a fan of spaces in columns anyway, but it isn't my database).
Thanks for your help.
Cheers Jo
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.