2 Replies Latest reply: Jun 9, 2015 4:28 AM by Joanna Seldon RSS

    auto number qlik sense - with renamed column

    Joanna Seldon

      Hiya

       

      Qlik Sense...reading from an SQL DB ...in the data load section


      i have created an Auto Number field for Customer as CustomerID with no issues


      However i have used the following in a context as had issue with null entrys...


      if(isnull ([Column two]),[Column one],[Column two]) as [Column Three]

       

      the issue i have is,  i wish to get the Column Three to create its own auto number too

       

      AutoNumber ([Column Three]) as (Column ThreeID),

       

      Is it please possible?

       

      i keep getting OLDB read error.

       

      please help

       

      Kind Regards

       

      Joeybird

        • Re: auto number qlik sense - with renamed column
          Gysbert Wassenaar

          1. Your database will not understand Qlikview functions, so do not use them in SQL SELECT statements that are send to your database.

           

          2. AutoNumber ([Column Three]) as (Column ThreeID) is not correct. Try square brackets: AutoNumber ([Column Three]) as [Column ThreeID]

           

          3. Simply put an AutoNumber() around the if statement: AutoNumber(if(isnull ([Column two]),[Column one],[Column two])) as [Column Three]

            • Re: auto number qlik sense - with renamed column
              Joanna Seldon

              Hiya

               

              I only put point 2. as a context sorry and did not put it exact correct syntax.

               

              however 3. worked brill thank you

               

              AutoNumber(if(isnull ([Column two]),[Column one],[Column two])) as [Column Three]

               

              but I have found out if you do point 3 first then point 2, you can create the new field required (to help with the null entry's) and auto number field too.

               

              Kind Regards

               

              Joeybird