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.  DateTime Column conversion and filter

    Employee
    Posted 12-30-2015 08:32

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

    Originally posted by: JAWILBUR

    Hello

    Using a DB Query node, I am trying to add a line in my "where" clause on a DateTime column, but I continue to get an error suggesting to convert this field to a string. What format should I use?

    Thanks


  • 2.  RE: DateTime Column conversion and filter

    Employee
    Posted 12-30-2015 12:57

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

    Originally posted by: JAWILBUR

    Here is the example of code I am putting into the DB query

    select distinct
    field1,
    field2,

    from ops$fre.sbb_base

    where date(field2,"CCYY,MM,DD") <> "0001-01-01"


  • 3.  RE: DateTime Column conversion and filter

    Employee
    Posted 01-04-2016 07:26

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

    Originally posted by: stonysmith

    You need to use a SQL command that is compatible with the database you are accessing. (Don't use BrainScript code in the SQL)
    For Oracle:

    select distinct field1,field2,
    from ops$fre.sbb_base
    where field2 <> to_date('0001-01-01','CCYY-MM-DD')


  • 4.  RE: DateTime Column conversion and filter

    Employee
    Posted 01-13-2016 13:56

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

    Originally posted by: JAWILBUR

    Back to this thread, I believe the attached error when I open the brdViewer is related.


    BrdViewer.jpg


  • 5.  RE: DateTime Column conversion and filter

    Employee
    Posted 01-13-2016 14:02

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

    Originally posted by: stonysmith

    You are getting some records back with a date similar to 00-00-0000 or 0001-01-01
    The 'error message' you are seeing with the BRD viewer affects the viewer only.. not the operation of the nodes on the server.