5 Replies Latest reply: Jul 23, 2012 11:31 AM by harry_hhs RSS

    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!

        • Re: Skip archived data
          mayilvahanan ramasamy

          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

            • Re: Skip archived data

              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
                • Re: Skip archived data
                  mayilvahanan ramasamy

                  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

                    • Re: Skip archived data

                      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

                • Re: Skip archived data
                  Rahul Lakhina

                  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 = '';