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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How does Inline keywork works

Hi All,

I am writing the below thing in my script. As per my knowledge this will create a dummy table with data.

LOAD * INLINE [

zip_code

123456789

112233445

111222333 

   

 

          ];

But can I manipulate or access this data.

For example as per a discussion going on how to extract the first 5 numbers form a zip code(zip1) and last 4 numbers(zip2).(I want to create a table with zip1 and zip2 as my columns)

Please let me know how can i achieve this.

Thanks,

Sujeet

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Inline just means that the data is specific inline directly after the INLINE keyword between square brackets. It loads data in a table just as a load from a qvd file or from an

excel file does.

Try:

ZipTable:

LOAD *,

left(zip_code,5) as zip5,

right(zip_code,4) as zip4

INLINE [

zip_code

123456789

112233445

111222333 

];


talk is cheap, supply exceeds demand
shree909
Partner - Specialist II
Partner - Specialist II

Hi

tmp:

LOAD * INLINE [

zip_code

123456789

112233445

111222333  ];

   

load

zipcode as zip

left (zipcode ,5) as zipcode5

right zipcode,4) as zipcode 4

resident  tmp;

drop table tmp;

Not applicable
Author

Thanks for the explanation.

--Sujeet

its_anandrjs
Champion III
Champion III

Hi,

Inline table is a table which loads in the QVW application created and maintain in application and we are able to create a QVD of this inline tables it is used to create when there is small amount of data we have.

You are able to create a table like this also

Temp:

LOAD * INLINE

[

zip_code

123456789

112233445

111222333

];

Main:

load

*,

left(zip_code,5) as zip5,

right(zip_code,4) as zip6

Resident Temp;

Drop Table Temp;

HTH

Regards,

Anand

Not applicable
Author

Hi Shree,

I understood the concept but still one more doubt about what is meaning of "resident tmp" and why we use the syntax like this. As per the previous explanation

ZipTable:

LOAD *,

left(zip_code,5) as zip5,

right(zip_code,4) as zip4

INLINE [

zip_code

123456789

112233445

111222333

];

this works fine.

I think these are some very basic doubts but till now i don't know the answer.

Thanks,

Sujeet

its_anandrjs
Champion III
Champion III

Hi,

Resident tmp; is used for creating table from tmp table. And resident is used if data should be loaded from a previously loaded input table.

Regards,

Anand

shree909
Partner - Specialist II
Partner - Specialist II

Resident always refer to a previously loaded table.

if  you want to make use of the existing table we go for resident .

remember that table should alwasy exists before using resident...