Reportmaker error

Questions and answers regarding general SQL and backend databases

Reportmaker error

Postby akalehzan » Wed Feb 09, 2005 8:38 pm

Hi all,

We are getting error to run the following query from Servoy Reportmaker 1.0RC1:

SELECT id.age_at_acquisition, id.id_diagnosis
FROM id
WHERE id.age_at_acquisition <= 12
AND id.id_diagnosis = "turner syndrome"

Error:
Bad query: java.sql.sqlEXception:[Microsoft][SQLServer 2000 driver for JDBC][SQLSErver}Invalid column name 'turner syndrome'


I ran the same query in Microsoft Access without any error:

SELECT dbo_ID.age_at_acquisition, dbo_ID.ID_DIAGNOSIS
FROM dbo_ID
WHERE (((dbo_ID.age_at_acquisition)<=12) AND ((dbo_ID.ID_DIAGNOSIS)="turner syndrome"));

Please advice,

Thanks,

Abrahim
akalehzan
 
Posts: 267
Joined: Mon Mar 29, 2004 8:15 am
Location: Stanford

Postby bcusick » Thu Feb 10, 2005 3:36 pm

Hi Abrahim,

FYI: ReportMaker is not a product of Servoy - it's an EXAMPLE FILE that I came up with to demonstrate what was possible in Servoy - thus, it's an unsupported project. Also, it's fully open, so you can also debug stuff as well.

Having said that - the table in your access example is called "dbo_id" and the one in your example is "id". IT IS A BAD IDEA to name your table with a reserved SQL word "id". Also - you need SINGLE QUOTES not DOUBLE QUOTES in your query for quoted literals.

Try changing your query to:
Code: Select all
SELECT age_at_acquisition, id_diagnosis
FROM id
WHERE age_at_acquisition <= 12
AND id_diagnosis = 'turner syndrome'


Hope this helps.
Bob Cusick
bcusick
 
Posts: 1262
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA


Return to SQL Databases

Who is online

Users browsing this forum: Bing [Bot] and 6 guests