logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
JoPitts  
#1 Posted : Sunday, January 7, 2018 8:42:06 PM(UTC)
JoPitts

Rank: Newbie

Groups: Registered
Joined: 1/7/2018(UTC)
Posts: 2
New Zealand

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
epf  
#2 Posted : Monday, January 8, 2018 7:13:33 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 552
Switzerland

Thanks: 7 times
Was thanked: 78 time(s) in 76 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.
JoPitts  
#3 Posted : Monday, January 8, 2018 7:06:30 PM(UTC)
JoPitts

Rank: Newbie

Groups: Registered
Joined: 1/7/2018(UTC)
Posts: 2
New Zealand

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
Users browsing this topic
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.