Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

loading certain fields from an existing table

Hi

We have a consolidated model that pulls info from different QVD's .  Here is a script extract of the script

LOAD DISTINCT *
FROM
[..\QVD\Jhb - ELSDAT\*.qvd]
(qvd); 

LOAD DISTINCT *
FROM
[..\QVD\Jhb - ELSDAT\*.qvd]
(qvd); 

Within these QVD there are many tables , however i only want to bring in is a table called "Transactions".  In this table it contains many fields but i only want three fields, which are

  • Sales Quantity
  • MonthIndex
  • Item Code

I am struggling to get the above right.  Here is my scripting below. 

LOAD

[Sales Qty],
[MonthIndex],
[Item Code FM]
Resident Transactions;
DROP TABLE Transactions;
FROM
[..\QVD\Jhb - ELLDAT\*.qvd]

(qvd);

Wre am i going wrong?  After "DROP TABLE Transactions" everything is underlined in red.

Thank you

kind regards

Nayan

1 Solution

Accepted Solutions
fernando_tonial
Valued Contributor

Re: Re: loading certain fields from an existing table

Yes, you can try another way.

LOAD DISTINCT

[Sales Qty],

[MonthIndex],

[Item Code FM]

FROM

[..\QVD\Jhb - ELSDAT\Transactions.qvd]

(qvd);

Best Regards.

Tonial.

5 Replies
fernando_tonial
Valued Contributor

Re: loading certain fields from an existing table

Hi, ,

Try this.

New_Transactions:

LOAD

[Sales Qty],
[MonthIndex],
[Item Code FM]
Resident Transactions;
DROP TABLE Transactions;


Best Regards.

Tonial.

Not applicable

Re: loading certain fields from an existing table

Hi Fernando

Thank you for your reply.  Do i add your script after the original scripting that i already have.  So should the script be as follows:

LOAD DISTINCT *

FROM

[..\QVD\Jhb - ELSDAT\*.qvd]

(qvd);

New_Transactions:

LOAD

[Sales Qty],

[MonthIndex],

[Item Code FM],

Resident Transactions;

DROP TABLE Transactions;


fernando_tonial
Valued Contributor

Re: Re: loading certain fields from an existing table

Yes, you can try another way.

LOAD DISTINCT

[Sales Qty],

[MonthIndex],

[Item Code FM]

FROM

[..\QVD\Jhb - ELSDAT\Transactions.qvd]

(qvd);

Best Regards.

Tonial.

Not applicable

Re: loading certain fields from an existing table

Try This

NewTransaction:

noconcatenate LOAD

               [Sales Qty],

               [MonthIndex],

               [Item Code FM]

Resident Transactions;

Drop Table Transactions;

Not applicable

Re: loading certain fields from an existing table

Thank you .  I will try it out and let you know .

kind regards

Nayan

Community Browser