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

How to extract data from excel if oracle/sql server is down

Hi Experts,

I am having 2 files (Qvd and excel).The data to the Qvd is coming from Oracle server. and the Excel having the data same as Qvd.

If the Server is down the Qvd will not refreshed, then we need to take data from excel?

Please help me if possible?

Thanks in advance

Swathi

1 Solution

Accepted Solutions
kenphamvn
Creator III
Creator III

Hi

you can check QVD file created time

Let vQVDPath = 'lib://Desktop/DSNVMG.qvd';

Let v_last_load_time =date(QvdCreateTime('$(vQVDPath)'),'YYYY/MM/DD') ;

if v_last_load_time < date(today(),'YYYY/MM/DD') then

  //load Excel

Else

  //Load QVD

end if;

Assumption QVD file refresh one time a day and Main app reload same day with QVD file

Regards

An Pham

View solution in original post

5 Replies
zhadrakas
Specialist II
Specialist II

Try someting like

Oracle:

Load A,B,C

where Date=Date(Today())

if noOfRows('Oracle') =0 Then


Load A,B,C

from Excel

ELSE

//do nothing

END IF

Anonymous
Not applicable
Author

Hi Tim,

Thanks for ur reply.

For the first time reloading it will work. if the data is already there in qvd but not refreshed, in that case noofrows() will not be '0'. How to do in this case?

Thanks

zhadrakas
Specialist II
Specialist II

Then you want to load * from QVD right?

Oracle:

Load A,B,C

where Date=Date(Today())

if noOfRows('Oracle') =0 Then


Load A,B,C

from Excel

ELSE

//data not refreshed

Load * from QVD

END IF

kenphamvn
Creator III
Creator III

Hi

you can check QVD file created time

Let vQVDPath = 'lib://Desktop/DSNVMG.qvd';

Let v_last_load_time =date(QvdCreateTime('$(vQVDPath)'),'YYYY/MM/DD') ;

if v_last_load_time < date(today(),'YYYY/MM/DD') then

  //load Excel

Else

  //Load QVD

end if;

Assumption QVD file refresh one time a day and Main app reload same day with QVD file

Regards

An Pham

Anonymous
Not applicable
Author

Hi Tim,

Excel is having updated data.Qvd was not updated due to server down of Oracle.

What I want is If the Qvd is not updated then need to load from excel.

Thanks