6 Replies Latest reply: Apr 9, 2015 7:17 AM by Dennis Bos RSS

    Make ranges of number for customers to select

    Dennis Bos




      We are loading data via an ODBC-connection from a SQL-database. In the short script-example below, we loaded the duration of actions with a StartDate greater then 2014-12-27 23:59:59. The Name/action column is a number.

      LOAD Name as action,
      Year(StartDate) as Year,
      Month(StartDate) as Month,
      Week(StartDate) as Week,
      Day(StartDate) as Day,

      SQL SELECT Name,

      FROM "Database".dbo.ActionsCustomer WHERE (StartDate > CONVERT(DATETIME, '2014-12-27 23:59:59'));


      A customer has a repeating range of action-numbers per week. For instance:

      Customer 1 has the action-numbers range 100-1400 per week

      Customer 2 has the action-number range 1400-3000 per week


      We have about 20 customers.

      How can we attach the ranges to the customers so we can select the sum of the duration of actions per week per customer?


      I tried SQL Create Table, but now success.