Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hai all,

I need to filter my table with respect to a date column, where i only need the selected date(s) Row(s) from it...

I need a selectQuery statement for this...

How can i do this..?

please help me...
Posted

You can make use of "in" here

select [ColumnNames] from [TableName] where [FilterColumnName] in ([FilterValues])
 
Share this answer
 
Comments
version_2.0 25-Jul-11 6:49am    
thanks...
hey! So what's problem you are facing you can use appropriate clause to fetch out the result.
use given syntax
SQL
SELECT column_name(s)
FROM table_name
WHERE column_name operator value


or If I am getting any thing wrong so please fell free to revert back with your table structure and your requirement in details.
 
Share this answer
 
Comments
version_2.0 25-Jul-11 6:22am    
see what i dont need is

Select Column_name,date_Column_name,column_name(s) from table_name
where date_Column_name BETWEEN 1st value AND 2nd value

I only need the selected dates rows from the table...

I Dont need any range of data need selected data only..

How can i do this...
RaviRanjanKr 25-Jul-11 6:44am    
Still I am not getting your Question. if you wanna to select Dates rows based on selected values then you need to use any appropriate Clause.
as
select date_Column_name from table_name where date_Column_name ='Dates Values'.
hey! I need more Information about your question. be more clear and specific while asking question.
If possible provide some Table Structure with your requirement.

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