2 Replies Latest reply: Jun 17, 2012 4:19 PM by Hardik Gandhi RSS

    Data Loading/Scripting

    Hardik Gandhi



      I have a Message Log table which records the date and time for all the online members which login onto the online systems. Now I have to provide the count for the logins/incoming traffic for our member portal page.


      The login count rule is that if a member login on a particular date for eg 06/17/12 more than one time still it will be consider as a single login for that day. The login date count are based on the month.


      So should I load my table normally and join it with the calendar table that i have created or there is some catch during the loading in order to achieve the required count rule.




        • Re: Data Loading/Scripting
          Jonathan Dienst



          I would create a table with a key of user id and date with a login flag (0 means no login, 1 means one or more logins for that user on that date).


          Using a table (Data) containing user ids and actial login dates, you could use something like this to create a login flag table:



          LOAD Distinct


               Date(Floor(date)) As date,

               1 As login_flag

          Resident Data;


          How you use depends on details of your data model.


          Hope that helps