LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Pull previous months with a date in where selection in the db query

    Employee
    Posted 05-07-2012 10:43

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: KWalden

    I want to pull information from the previous 2 months in the where selection of the db query.
    But i dont want to use example below. Is there another format so it will automatically pull the previous months when you run the graph.
    AND TM.AUDIT_CONTROL_DATE >= '1120301'
    AND TM.AUDIT_CONTROL_DATE <= '1120302'


  • 2.  RE: Pull previous months with a date in where selection in the db query

    Employee
    Posted 05-08-2012 07:39

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: timonk

    Good Day,

    This is really a question of the SQL query you are using rather than the LAE product itself. So your options are basically SQL syntax.

    Have you considered the BETWEEN clause? The basic syntax for this is:
    SQL BETWEEN Syntax

    SELECT column_name(s)
    FROM table_name
    WHERE column_name
    BETWEEN value1 AND value2

    There are several examples to be found through a Google search.

    Aside from this and the method you are currently using (which I assume is something along the lines of "select X from Y where ... AND TM.AUDIT >= ...AND TM.AUDIT <= ") I'm unaware of another sql form to parse your date fields in the manner you want.

    Regards,
    Timon Koufopoulos
    Lavastorm Analytics Support.


  • 3.  RE: Pull previous months with a date in where selection in the db query

    Employee
    Posted 05-10-2012 07:05

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: KWalden

    thank you...