18 Replies Latest reply: Dec 14, 2013 6:41 PM by Thomas Jensen RSS

    incremental load from sql database

      Dear members of the Qlikview community,

      I’m sorry to bother you and I already thank you.

      I’ve a problem with my Qlikview application (the data comes from a SQL server management 2008/odbc database).

      I would like to execute the application in live, and, thus, I need to realize incremental reloads : use qvd files with a simple add from the SQL database.

      As I read on the Qlikview Manual Book, I added 2 variables (example for the reload of a table).

      set DCX=Now();


      Load autonumber(INFO&DATE_ID_T3) as Cotation_ID,*;
      LOAD year(DATE)*10000 + month(DATE)*100 + day(DATE) as [DATE_ID_T3],*;
      SQL SELECT *
      FROM DBPRICING.dbo.HCOT where DATE>#
      $(MDX)# and DATE<#$(DCX)#;
      concatenate load * from Cotation.qvd (qvd);

      set MDX=Now();


      However, I encounter an error: (scriperror.jpg the joined file…)

      I’ve done a lot of tests but I got errors because of this part:

      DATE>#$(MDX)# (I’ve tested without the # or with today() instead of now() )

      But it works with DATE>Floor(CAST(GETDATE() AS float));

      But it’s not suitable for me because I need a Year-Month-Day-Hour-Minute-Second format.

      PS: In my SQL database, the date is in this format:

      2013-12-10 16:45:50.013