Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
Highlighted
Not applicable

Re: Currency - store in QVD

why did you add this:

(qvd) Where Not(Exists(ExchangeDate)

at the end of your incremental load?

it doesnt seem right....

it looks like you are loading from the QVD only data that doesnt exist in the incremental load in in that case you will load nothing. you already took the max date as a variable and extracted only newer rates.

take that line out and i believe your problem will be solved.

Highlighted
New Contributor

Re: Currency - store in QVD

Elanir,

I added that piece of code because Jonathan told me so.

See his reply on this topic of the 22nd of June.

I adjusted the code and will let it run tomorrow.

I will let you know how it went.

Thanks

Highlighted
New Contributor

Re: Currency - store in QVD

Elanir,

It worked.

Now I see all the currencies of today & off yesterday.

Thanks a lot!

Highlighted
Not applicable

Re: Currency - store in QVD

Strange.  It works fine for me when I generate the QVD file, but reloading does not work.

Any idea what might be wrong?

2012-11-26_17-46-45.jpg

Highlighted
Partner
Partner

Re: Currency - store in QVD

Don't forget to write the whole sentence

Store EuroRates into EuroRates.QVD; wrong

Store EuroRates into EuroRates.QVD (qvd); right.

Highlighted
New Contributor

Re: Currency - store in QVD

Thor,

I think this is what happens when you try to reload twice a day.

Because he already has all the data for the current day.

Try to wait a day so that there is new data to reload.

Then your problem should be solved..

Highlighted
Not applicable

Re: Currency - store in QVD

Beautiful

Worked like a charm.  Is there any way to generate an error message that will say something like "Exchange rates are already up to date" instead of the "Table not Found" error?

/Thor

Highlighted
New Contributor

Re: Currency - store in QVD

Thor,

I have no idea. Never tried it.

I don't have any problems with the error because the QVW runs automatically, only once a day.

Highlighted
Not applicable

Re: Currency - store in QVD

True.  Should not be an issue.

Final question.  If there are no exchange rates on the dates that you have transactions.  How do you select which exchange rate to use?

/Thor

New Contributor

Re: Currency - store in QVD

Thor,

I'm not using these currencies to combine with transactions.

You could try to make a loop so when there isn't a currency found for a specific day, you can let it look back one or more days, until he has found a currency.

But no idea how to actually do that.

Good luck with it!