Search code examples
sqldatelibreoffice-base

Libre Office Base Query


I'm running a Libre Office Base database to manage my co-op's membership directory. I'm trying to write a query to get a count of current membership, but I keep running into a SQL Status 37000, error code -16, Wrong data type: java.lang.IllegalArgumentException in statement [SELECT COUNT(*) FROM "Families" WHERE "Families"."Renewal Date" > '06/30/18'].

My query

SELECT COUNT(*) FROM "Families" WHERE "Families"."Renewal Date" > '06/30/18'

From everything I've seen and read, that query is formatted appropriately and I've checked the table name and column name, repeatedly.


Solution

  • You can use this construction for Date values

    {D '2012-01-01'}

    SELECT COUNT(*) FROM "Families" WHERE "Families"."Renewal Date" > {D '2018-06-30'}
    

    the format '06/30/18' is ok only for Open Office