Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Sigle load

Hi Experts,

I have one folder. in folder i have" one excel file  and one txt file" both files having same  fields with different data.

Excel:-

ID NAME,AGE

1    Raj      21

2   Raja     22

Txt:-

ID NAME AGE

3    Krish      23

4   Krishna  24

Here my requirement is how can i load  both files at a single load statement, is it possible ?

Regards

Mahesh

10 Replies
swuehl
MVP
MVP

You can't address two input table sources (*) with a single LOAD statement, but you can concatenate your data into a single resident output table (either by autoconcatenation (same number and names of fields) or by using forced concatenation using CONCATENATE LOAD prefix).

edit:

(*)

You may think of using some kind of wildcards in your LOAD statement, but

- this will create also multiple statements by the QV script engine

- I don't think you can use wildcards here for the two distinct input formats.

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

The script:

Table:

LOAD ID,

     Name,

     Age,

     'xlsx' as File

FROM

(ooxml, embedded labels, table is Sheet1);

Concatenate (Table)

LOAD ID,

     Name,

     Age,

     'txt' as File

FROM

(txt, codepage is 1257, embedded labels, delimiter is spaces, msq);

The result:

Screenshot_4.jpg

The qvw is also attached with the data files.

Anil_Babu_Samineni

Use Concatenate with the simple load excel and while load Notepad file use Spaces for Delemiter

Capture1.PNG

Excel:

LOAD ID,

     Name,

     Age

FROM

[226916.xlsx]

(ooxml, embedded labels, table is Sheet1);

Concatenate (Excel)

LOAD [ID],

     Name,

     Age

FROM

[226916.txt]

(txt, codepage is 1252, embedded labels, delimiter is spaces, msq);

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ramasaisaksoft

Hi Mahesh,

While you fetching data from any file type into qlikview

you can write loop statement for the same file type like(sheet 1,sheet 2....sheet n .xls) and it is not possible for different type of file types(1 is xls and 2nd is .txt,3rd is odbc...etc)

so it is not possible

coming to your data seems both are having same fields so automatically qlikview fallows Concatenation of 2 tables into one table no need to write the concatenate statement also

so output  is created only one table with 4 rows.

qlikview979
Specialist
Specialist
Author

Hi All,

Thanks for sharing  Valuable information.

Regards

Mahesh

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

If you have found your answer could you please select the Correct answer. That will make the thread closed.

Thank you!

qlikview979
Specialist
Specialist
Author

Hi Mindaugas ,

That is not possible in qlikview

what i need is i want to load two different format files into a single load statement .

Not applicable

It's possible qlikview979

You can add the two different data into script and can do forced concatenation then it will show in single table.

But you can't  select two different formats data under single load statement.

Could please give a detail explanation about is your requirement.

qlikview979
Specialist
Specialist
Author

Hi Vijay

I have one folder. in folder i have" one excel file  and one txt file" both files having same  fields with different data.

Excel:-

ID NAME,AGE

1    Raj      21

2   Raja     22

Txt:-

ID NAME AGE

3    Krish      23

4   Krishna  24

Here my requirement is how can i load  both files at a single load statement, is it possible ?

Regards

Mahesh