Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to get a sql query such that based on the coloumn validto and validfrom
in such a way that the validto coloumn for the address table should be greater than current date and it should have null adreess in the result

ID Name ValidTo ValidFrom
1 aa null null
2 bb 31-dec-2010 null
3 cc null null


Contains the null query and not the past date from the current date
Posted

1 solution

SQL
For Sql Server
select * from table_Name where validto>getdate()
for Pl/Sql
select * from table_Name where validto>sysdate()
 
Share this answer
 
v3
Comments
lalitkr 29-Jul-13 3:57am    
Thanks
But when i run the above query in PL/SQL i am getting error stating that GETDATE invalid identifier
Zafar A khan 29-Jul-13 4:02am    
replace getdate() by sysdate for pl/sql
Maciej Los 29-Jul-13 4:57am    
+5
Zafar A khan 29-Jul-13 5:24am    
Mark as solution/solved, glade to help you
Maciej Los 29-Jul-13 5:34am    
Who? Me?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900