Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to get column names of a table in mySql from script?

Hello,

I'm trying to get column names from a mySql database table in a single column with the columns names.

I have a script working in dbVizualizer:

SELECT COLUMN_NAME

  FROM INFORMATION_SCHEMA.COLUMNS

  WHERE TABLE_SCHEMA='schema_name'

  AND TABLE_NAME='table_name';

This works fine.

But when I try to run it through the QV script, I get an empty result  - I'm using an ODBC connection to mySql.

Temp:

SQL

SELECT COLUMN_NAME

FROM INFORMATION_SCHEMA.COLUMNS

WHERE TABLE_SCHEMA='schema_name'

AND TABLE_NAME='table_name';

This script in QV gets an Empty result.

Anyone?

Thanks!

Boris

Tags (3)
3 Replies
awhitfield
Esteemed Contributor

Re: How to get column names of a table in mySql from script?

Hi Boris,

What's the rest of your script?

Andy

Not applicable

Re: How to get column names of a table in mySql from script?

Never mind, I found the problem, the parameters I passed to the TABLE name and schema weren't in the right syntax.

Not applicable

Re: How to get column names of a table in mySql from script?

Boris.. If you have fixed the issue. then please close the ticket

Community Browser