Click here to Skip to main content
15,888,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I select current date from a datetime column in mySQL


This is not working:
SQL
select * from dbo.INVENTORY where  INV_NO is NULL and  AGT_BKG_DATE = convert(date,GETDATE());


how will I resolve this?
Posted
Updated 4-Mar-14 15:44pm
v2
Comments
King Fisher 4-Mar-14 23:51pm    
any conversion error?
Amalraj Ramesh 4-Mar-14 23:52pm    
post your table data also for better solution

select * from dbo.INVENTORY where INV_NO is NULL and AGT_BKG_DATE = CURDATE();
 
Share this answer
 
select * from dbo.INVENTORY where INV_NO is NULL and convert(date,AGT_BKG_DATE) = convert(date,GETDATE());
 
Share this answer
 

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