5 Replies Latest reply: Feb 26, 2018 1:33 AM by Ryan Reid RSS

    Filter data load from SQL server

    Ryan Reid

      I am trying to filter the data load from a SQL server comparing against a field that uses the following date format example: '2018_February'.

       

      Currently, I can filter using the where and like, as shown below:

       

      [RefreshSRList]:

      LOAD

      [ID] AS [RefreshSRList.ID],

      [RefreshType] AS [RefreshSRList.RefreshType],

      [RefreshCycleName] AS [RefreshCycle-RefreshCycleName],

      [SMTicket] AS [RefreshSRList.SMTicket],

      [Processed];

      SQL SELECT "ID",

      "RefreshType",

      "RefreshCycleName",

      "SMTicket",

      "Processed"

      FROM "RefreshMon"."dbo"."RefreshSRList"

      WHERE RefreshCycleName like '2018_February';

       

      But rather than having to alter the '2018_February' every month, can I use SYSDATETIME or such to use the current month year into a format that will compare against the 'RefreshCycleName' field?

       

      Thanks!