Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm developing an application which required Direct Discovery. I tested using the MSSQL, I got no problem in developing the application. But now I need connect to another database type which is mySQL, but when I reload the script, error from the DIRECT QUERY statement.
SQL##f - SqlState: 37000, ErrorCode: 1064, ErrorMsg: [MySQL][ODBC 5.3(w) Driver][mysqld-5.0.41-community-nt]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 '[ServiceNo] FROM [branchs].[stuservice]' at line 1
Please advice. Or anyone have the sample code for direct discovery in mySQL?
Regards,
CS Khoo
Hi,
This is the only thing I could find.
Direct discovery can be used in conjunction with MySQL and MS Access but may require the
following parameters in the set variables due to the quoting characters used in these sources:
SET DirectIdentifierQuoteChar='``';
Bill
Hi there,
Can you post the entire SQL query here? Have you run the statement successfully against MySQL directly?
Steve
Hi,
MySQL has different SQL syntax than MSSQL..
- Ralf
No, when the script start to run the 1st column, then error. If not using any direct discovery function, I managed to read every tables as usual.
Below are the statement.
ODBC CONNECT TO QlikQMS (XUserId is fBMYMZdNPDdeP, XPassword is YWaGDZdNPDdCDZMGPG);
DIRECT QUERY
dimension
ServiceNo,
BranchCode
measure
CurrTicket,
NextTicket,
PhysicalTicketWaiting,
TransferTicketWaiting,
PhysicalTicketIssued,
TransferTicketIssued,
PhysicalTicketServed,
TransferTicketServed,
PhysicalTicketCalled,
TransferTicketCalled,
PhysicalTicketRenegaded,
TransferTicketRenegaded,
TicketTransferredOut,
AvgWTSec,
AvgSTSec,
AvgTTSec,
CurrWTSec,
CurrSTSec,
TotalWTSec,
TotalSTSec,
TotalTTSec,
TotalWithinTgtWT,
TotalWithinTgtST,
TotalWithinTgtTT,
CurrTicketIssueTime,
CurrTicketStr,
NextTicketStr,
UpdateTimeStamp,
ServiceState,
LastStatusTime,
GroupTicketCount
detail
CounterOpened
FROM branchqms.stuservice;
Any idea how to solve?
No, the Direct Query syntax seems to be correct.
I think it's probably the created SQL in the background and MySQL doesn't like the brackets...
Btw. you can trace those SQL statements in the ODBC driver.
Hi,
This is the only thing I could find.
Direct discovery can be used in conjunction with MySQL and MS Access but may require the
following parameters in the set variables due to the quoting characters used in these sources:
SET DirectIdentifierQuoteChar='``';
Bill
Please advice how to trace the statement?
Yes, I did applied this.