Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to updated only the last row in the record??

Dear All,

I got a table as attached, while converting the loaded excel file into QVD I want to load only >= the date exist in the excel.

please see the highlighted row in the excel.  jagan mohan

15 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Temp:

LOAD

Max(DATE) AS MaxDate

FROM FileName.qvd (qvd);

LET vMaxDate = Date(Peek(MaxDate));

DROP TABLE Temp;

Data:

LOAD

*

FROM ExcelFile

WHERE DATE > '$(vMaxDate )';

Concatenate(Data)

LOAD

*

FROM FielName.qvd (qvd);

Store Data INTO FileName.qvd;

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

dear Jagan,

Thanks for the reply...

The code works only half way through after that I have commented the lines

Please find the attachment in this links http://community.qlik.com/message/678919#678919

Please help me....

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this script

Data:

LOAD Company,

     Department_CUTTING,

     Factory_CUTTING,

     Owner_CUTTING,

     DATE,

     [Plan 2day ready to issue stock_CUTTING],

     [Actual 2day ready to issue stock_CUTTING],

     [Plan BPCD hit rate_CUTTING],

     [Actual BPCD hit rate_CUTTING],

     [Plan SPCD hit rate_CUTTING],

     [Actual SPCD hit rate_CUTTING],

     [Plan FPY_CUTTING],

     [Actual FPY_CUTTING],

     [Plan Cutting Overall Efficiency_CUTTING],

     [Actual Cutting Overall Efficiency_CUTTING],

     [Plan Cutplan vs Acheivement_CUTTING],

     [Actual Cutplan vs Acheivement_CUTTING],

     [Plan OTD_CUTTING],

     [Actual OTD_CUTTING],

     [Plan Cut sending plan  vs Acheivement_CUTTING],

     [Actual Cut sending plan  vs Acheivement_CUTTING]

FROM

[CUTTING.qvd]

(qvd);

Temp:

LOAD

Max(DATE) AS MaxDate

RESIDENT Data;

LET vMaxDate = Date(Peek('MaxDate'));

DROP TABLE Temp;

Concatenate(Data)

LOAD Company,

     Department,

     Factory,

     Owner,

     Date(Month) as DATE,

     Accounts,

     [Plan PSD],

     [Actual PSD],

     [Plan Bulk PCD],

     [Actual Bulk PCD],

     [Plan Sizeset PCD],

     [Actual Sizeset PCD],

     [Plan Ordership],

     [Actual Ordership],

     [Plan Lost time],

     [Actual Lost time]    

FROM

[FM.xls]

(biff, embedded labels, table is FM$)

WHERE Date(Month) > '$(vMaxDate)';

Regards,

Jagan.

Not applicable
Author

what is the different between the code you gave and below??

"Where not exist (DATE, ITEM, BUYER) "

jagan
Luminary Alumni
Luminary Alumni

Hi,

Not sure, is the code which I gave is working?

Regards,

jagan.

Not applicable
Author

its look okay

thanks you so much for your helping hand