I need to run a select query with a where clause with field as timestamp datatype.
In scheme the datatype of SUBMIT date is timestamp
"SUBMIT_DATE" timestamp,
select "SUBMIT_DATE" from "MESSAGES_2016_02_18";
SUBMIT_DATE
--------------------------
2016-02-18 16:26:14+0530
(1 rows)
but when i try
select * from "MESSAGES_2016_02_18" where "SUBMIT_DATE"='2016-02-18 16:26:14+0530';
(0 rows)
Can anyone tell me how to get the desired result?
the table is:
CREATE TABLE "MESSAGES_2016_02_18" (
"ADDR_DST_DIGITS" ascii,
"ID" uuid,
"SUBMIT_DATE" timestamp,
"TARGET_ID" ascii,
"VALIDITY_PERIOD" timestamp,
PRIMARY KEY (("ADDR_DST_DIGITS"), "ID")
) WITH
bloom_filter_fp_chance=0.010000 AND
caching='KEYS_ONLY' AND
comment='';
I created a index as well as "SUBMIT_DATE" is not a primary key
create INDEX fetch_date ON "TelestaxSMSC"."MESSAGES_2016_02_18" ("SUBMIT_DATE");
Please let me know how do i fetch the details with the above query.