Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil1989
Contributor
Contributor

Avoid Qvd if not present in script??

Hi ,

Thanks in advance.

I have three QVD of three tables i.e.orders, payment and refunds.

And in my main Transformation qvd i am doing full outer join of this three table.

orders

join

payment

join

Refund

suppose if payment qvd vice versa is not presnt then script get failed , my requirement is if payment qvd is not presnt then also script  should run with

orders

join

Payment.

Thanks,

Sunilkumar

4 Replies
m_woolf
Master II
Master II

Set ErrorMode = 0;

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Or use a logic with calls to FileTime() to check whether the two last Qvds really exist. In script code:

Orders:

LOAD * FROM Orders.qvd;

IF Not IsNull(FileTime('Payments.qvd')) THEN

  LEFT JOIN Orders LOAD * FROM Payments.qvd;

END IF

IF Not IsNull(FileTime('Refunds.qvd')) THEN

  LEFT JOIN Orders LOAD * FROM Refunds.qvd;

END IF

Adjust this technique to whatever specific needs you may have.

Best,

Peter

swuehl
MVP
MVP

Peter, it seems you accidentally missed the Filetime() usage you wanted to demonstrate:

IF Not IsNull(Filetime('Payments.qvd')) THEN

Peter_Cammaert
Partner - Champion III
Partner - Champion III

True, corrected

Thanks, Stefan !