To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=50442
                  Issue #:|50442
                  Summary:|SQL error from query wizard
                Component:|Database access
                  Version:|OOo 2.0 Beta
                 Platform:|PC
                      URL:|
               OS/Version:|Linux
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|none
              Assigned to:|dbaneedsconfirm
              Reported by:|rnhainsworth





------- Additional comments from [EMAIL PROTECTED] Tue Jun  7 12:01:15 -0700 
2005 -------
Using OpenOffice 1.9.100 database. Using MySql server
(4.0.23_Debian-3ubuntu2-log). Using ODBC connectivity.

I have three tables (with fields): bank_related(id,month,regn),
QuantData(lineN,bkmth,val), questions(lineN,QorA)

I tried using query wizard with all three tables related by two relations
bank_related.id->QuantData.bkmth
questions.lineN->QuantData.lineN

The query failed with error
"SQL Status: HY000
Error code: 1000

Syntax error in SQL expression"

To narrow the problem, I set up SQL queries that work in another application
(mysqlcc). The following two queries both work in mysqlcc attaching to the same
database. One works with OOffice, the second does not.

Note how the failure comes when the number of tables in the 'from' field
increases from two to three.

[works]
select questions.lineN,ExprtData.val
from questions,ExprtData
where 
ExprtData.lineN=questions.lineN
and ExprtData.bkmth=1
order by lineN

[does not work]
select questions.lineN,ExprtData.val
from questions,ExprtData,bank_related
where 
ExprtData.lineN=questions.lineN
and ExprtData.bkmth=bank_related.id
and bank_related.month="200012"
and bank_related.regn = "409"

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to