Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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
Partner

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.