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

Store qvd table with certain conditon.

I want to save QVD file when the following conditions are met.

I tried following scripts but failed.

if YesOrNo= 'Yes' then

ALL_TABLE:

LOAD

    country

    division

    Cluster,

    YesOrNo

FROM [lib://QVD\*.qvd]

(qvd)where YesOrNo= 'Yes';

endif

store ALL_TABLE into 'lib://QVD\ ALL_TABLE .qvd';

drop table ALL_TABLE ;

4 Replies
shivanandk
Partner - Creator II
Partner - Creator II

Here is one way

ALL_TABLE:

LOAD

    country

    division

    Cluster,

    YesOrNo

FROM [lib://QVD\DataFile.qvd]

(qvd)where YesOrNo= 'Yes';

If NoOfRows('ALL_TABLE') > 0 Then

     store ALL_TABLE into 'lib://QVD\ ALL_TABLE .qvd';

End If


drop table ALL_TABLE ;

Replace * with your name of the QVD file (like Datafile.qvd) to be more specific.

juraj_misina
Luminary Alumni
Luminary Alumni

What is the error you are facing? It's not clear from your post.

Energetic
Contributor III
Contributor III
Author

ALL_TABLE:

LOAD

    country

    division

    Cluster,

    YesOrNo

FROM [lib://QVD\*.qvd]

(qvd)where YesOrNo= 'Yes';

store ALL_TABLE into 'lib://QVD\ ALL_TABLE .qvd';

drop table ALL_TABLE ;

it works!

Energetic
Contributor III
Contributor III
Author

I resolved it . Thanks.