Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to add a select system date statement in the where clause

Need help. I try to add a select clause in where clause in my query so that it can select the data which is same as the device system date .

my code that work:
(EXTRACT(YEAR FROM W.BrwDate) = '2021')

I try to add select sysdate from dual; so no need to write the specific year and query can be use for every year . But if i combine the code it no work

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

WHERE (EXTRACT(YEAR FROM RegYear = (select sysdate extract (year from dual))))

So is that any method can solve my mistake?

>Solution :

Should be

where extract (year from regyear) = extract (year from sysdate)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading