Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

SQL error on Postgress

#4462

I am getting an PGError when using the following code snippet to search for all records that have an expirationDate greater than today.

campaigns = Table(:users)
campaigns.where(campaigns[:expirationDate].gt(Date.today.midnight))

According to this error it looks like the '*' is missing between the select and from.

ActionView::Template::Error (PGError: ERROR: syntax error at or near "FROM"
LINE 1: SELECT FROM "users" WHERE "users"."expiration...

                ^

: SELECT FROM "users" WHERE "users"."expirationDate" > '2010-04-22 06:00:00.000000')

Reported by Trey Spiva · April 23rd, 2010 @ 03:11 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Ryan Bigg
    Ryan Bigg
    • State changed from new to open

    Could you submit a failing test case for this issue please?

    April 25th, 2010 @ 12:18 AM

  2. Trey Spiva
    Trey Spiva

    It turns out that I made a mistake in my code. The name of the table was incorrect. Sorry for the mistake.

    April 26th, 2010 @ 04:13 PM

  3. Ryan Bigg
    Ryan Bigg
    • State changed from open to invalid

    April 26th, 2010 @ 09:26 PM