Hello,
I'm new to postgres and I've googled on this seemingly simple issue all morning...
FreeBSD 6.1
PostgreSQL 8.2.3
PHP 5.2.5
I want to query my table and return records (to script.php) that have an empty timestamp (with timezone) field.
please consider the following 2 example queries:
SELECT * FROM table WHERE timestamp = ''
SELECT * FROM table WHERE NOT timestamp
I know neither of these queries works but they give an idea of what I'm trying to accomplish.
I have a timestamp field set when the records are created but then I have another timestamp field which remains empty until the record gets processed. This way I know both when the record was created and when the record was updated/processed.
If I can't figure out how to do this I will need to change my table structure and add a boolean field to indicate whether or not a record has been processed. Considering I need to know when the record gets processed as well as if it has been processed in the first place; I thought this approach would be efficient.
The following query seems to get me what I want but when the year changes it will break...
SELECT * FROM table WHERE timestamp NOT LIKE '2008'
Thanks for any help!
Start Free Trial