Click here to Skip to main content
15,905,420 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
MS Access Data Base;

when i run the below query;

select * from Tb_SCh_TIme_Table

 Sch_Date	Session	Course	Faculty_Code
2/11/2013	1	ARPA	BAB
2/12/2013	1	CHEMCO	BSR
2/13/2013	3	CL2	CJJ 


when i run the Below query
SQL
select * from Tb_SCh_TIme_Table where Sch_Date = 2/11/2013


The output is not coming why?

what is the problem in my above query?

Please help me.

Regards,
Narasiman P.
Posted
Updated 24-Feb-13 21:09pm
v2
Comments
Shubh Agrahari 25-Feb-13 2:54am    
something error showing...???
Shubh Agrahari 25-Feb-13 2:56am    
try this...

select * from Tb_SCh_TIme_Table where Sch_Date = '2/11/2013'

or

select * from Tb_SCh_TIme_Table where Sch_Date = "2/11/2013"

or check with change the format like....2-11-2013

use this query
"select * from Tb_SCh_TIme_Table where Sch_Date = #2/11/2013#"

also go through following link.
http://office.microsoft.com/en-in/access-help/where-clause-HP001032287.aspx[^]
 
Share this answer
 
v2
please try this:

SQL
select * from Tb_SCh_TIme_Table where Sch_Date like '2/11/2013'

or
SQL
select * from Tb_SCh_TIme_Table where Sch_Date = '2/11/2013'
 
Share this answer
 
try this

C#
Datetime date = DateTime.Parse("2/11/2011");
// initialize the vaialbe


now write the query.

select * from Tb_SCh_TIme_Table where Sch_Date = '"+ date +"' ;
 
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