Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

header (field name)

Hi

how can i load just the header of the table ? just the fields names?

thanks a lot

8 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Create a LOAD statement without embedded header and add the prefix FIRST 1

Peter

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

LOAD

*

FROM FileName

WHERE 1=2;

Regards,

Jagan.

Anonymous
Not applicable
Author

could u give an example?

Anonymous
Not applicable
Author

on a big table this will take a long time

senpradip007
Specialist III
Specialist III

Try this:

LOAD A,

     B,

     C,

     D

FROM

C:\Data\TestData.xlsx

(ooxml, no labels, table is Sheet1)

Where RowNo() < 1

Hope it will help you.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Then try like this

LOAD

WHERE 1= 2;

FIRST 1 LOAD  *

FROM DataSource;

Regards,

Jagan.

Anonymous
Not applicable
Author

yeah i thought about that

FIRST 1 LOAD  *

FROM DataSource

and then

LOAD

WHERE 1= 2;

but it is still a big table and the first part  takes a long time

tresesco
MVP
MVP

Try like:

TempTable:

First 1 Load * <Datasource>;    // it will read single (the first one) record and should not take much time;

Final:

Load

          *,

          '1' as Jnk

Resident TempTable Where 1=2;

Drop Table TempTable;

Drop Field Jnk;