Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

Why does this query returns no output

I have one record in DB (attached)

but why does this query does not return output

/* Formatted on 25/04/2011 3:43:22 PM (QP5 v5.136.908.31019) */
SELECT S.*
  FROM SCHEME S
 WHERE TO_DATE (SYSDATE, 'DD/MM/YYYY:HH:MI SSPM') >= S.EFFECTIVEDATEFROM
       AND TO_DATE (SYSDATE, 'DD/MM/YYYY:HH:MI SSPM') <= S.EFFECTIVEDATETO
       
       
data.txt
0
GRChandrashekar
Asked:
GRChandrashekar
1 Solution
 
Pratima PharandeCommented:
SELECT S.*
  FROM SCHEME S
 WHERE TO_DATE (SYSDATE, 'DD/MM/YYYY:HH:MI SSPM') >= TO_DATE (S.EFFECTIVEDATEFROM ,'DD/MM/YYYY:HH:MI SSPM')
       AND TO_DATE (SYSDATE, 'DD/MM/YYYY:HH:MI SSPM') <= TO_DATE (S.EFFECTIVEDATETO ,'DD/MM/YYYY:HH:MI SSPM')
0
 
sdstuberCommented:
>>>  TO_DATE (SYSDATE, 'DD/MM/YYYY:HH:MI SSPM')

this is wrong


SYSDATE is already a date


0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now