Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Skip archived data

Hello,

I've been trying quite alot now, looked on the forum and i can't seem to get it working.

It's probaly very simple, but what i want to do is skip certain data.

Currently i have the following script:

ODBC CONNECT TO [xx] (XUserId is xx, XPassword is xx);

       

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename;

When something gets archived the field archiveid gets filled in with an ID. So basicily what i want is only to import the rows what haven't been archived.

Thanks!

1 Solution

Accepted Solutions
MayilVahanan

Hi,

     Try like this

    

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename where archieveid = '';

or

Load * where len(Trim(archieveid))=0;

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename ;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

5 Replies
MayilVahanan

Hi,

     Do you want to remove all rows and all column for particular id?? if so,

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename where archieveid = "Condition";

or remove values only for paritcular id ..

TABLE1:

Load *, if(archiveid = "condition", archiveid) as Archive;

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename;

Can you say clearly the condition/

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Try the following:

ODBC CONNECT TO [xx] (XUserId is xx, XPassword is xx);
       
TABLE1:
SQL SELECT
     creationdate,
     name,
     owner,         
     archiveid
FROM database.tablename

Where archiveid = '';

Not applicable
Author

Mayil Vahanan Ramasamy wrote:

     Do you want to remove all rows and all column for particular id?? if so,

Yes, if archiveid contains no ID i want to load it, if it containts an ID it needs to be skipped, example i have the following information in the database:

Creationdatenameownerarchiveid
2010PietTempstaff1
2011JanTempstaff
2011JantjeTempstaff
2012JantjeTempstaff1

I want qlikview only to load the following:

Creationdatenameownerarchiveid
2011JanTempstaff
2011JantjeTempstaff
MayilVahanan

Hi,

     Try like this

    

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename where archieveid = '';

or

Load * where len(Trim(archieveid))=0;

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename ;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Mayil Vahanan Ramasamy wrote:

Hi,

     Try like this

Load * where len(Trim(archieveid))=0;

TABLE1:

SQL SELECT

     creationdate,

     name,

     owner,         

     archiveid

FROM database.tablename ;

Hope it helps

Thanks! that one worked