Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Direct Discovery for mySQL

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

1 Solution

Accepted Solutions
Employee
Employee

Re: Direct Discovery for mySQL

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

11 Replies
MVP
MVP

Re: Direct Discovery for mySQL

Hi there,

Can you post the entire SQL query here?  Have you run the statement successfully against MySQL directly?

Steve

MVP
MVP

Re: Direct Discovery for mySQL

Hi,

MySQL has different SQL syntax than MSSQL..

- Ralf

Not applicable

Re: Direct Discovery for mySQL

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;

Not applicable

Re: Direct Discovery for mySQL

Any idea how to solve?

MVP
MVP

Re: Direct Discovery for mySQL

No, the Direct Query syntax seems to be correct.

MVP
MVP

Re: Direct Discovery for mySQL

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.

Employee
Employee

Re: Direct Discovery for mySQL

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

Not applicable

Re: Direct Discovery for mySQL

Please advice how to trace the statement?

Not applicable

Re: Direct Discovery for mySQL

Yes, I did applied this.

Community Browser