Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
My data is in foll format
ID|  UID | Branch_Code | Transaction_Date | Description | Amount_Final | As_Of_Date ||
1|  zaere | 0 | 20-08-2004 | Description1 | 39232 | 31-01-2014 ||
2|  zaere | 0 | 23-03-2011 | Description2 | 80    | 31-01-2014 ||
3|  zaere | 0 | 20-08-2004 | Description1 | 39232 | 28-02-2014 ||
4|  zaere | 0 | 23-03-2011 | Description2 | 80    | 28-02-2014 ||
5|  zaere | 0 | 23-03-2011 | Description2 | 80    | 28-02-2014 ||
6|  abc   | 0 | 24-03-2011 | Descri       |100    | 28-02-2014 || 
7|  pqr   | 0 | 11-03-2011 | Des          | 2000  | 31-01-2014 ||

I need to fetch Outstanding Entries, those which exists in current month(28-02-2014) as well as previous month( 31-01-2014 )
Posted
Updated 1-Jun-14 20:47pm
v2
Comments
ArunRajendra 2-Jun-14 2:09am    
Reframe the question its not clear.
Shanalal Kasim 2-Jun-14 2:13am    
The question is not clear
Kajal Narwani 2-Jun-14 2:17am    
i want to select UID where As_Of_Date='2014-02-28' and '2014-01-31'
Kajal Narwani 2-Jun-14 2:47am    
I need to fetch Outstanding Entries, those which exists in current month(28-02-2014) as well as previous month( 31-01-2014 ) .
King Fisher 2-Jun-14 3:07am    
your Question is not clear.improve it

Please, read comments to the question.
SQL
SELECT <FieldList>
FROM <TableName>
WHERE As_of_Date BETWEEN '01-01-2014' AND '28-02-2014' 
 
Share this answer
 
It's not exactly clear from your question, since the two dates you want to find appear to be the same...

But... Try something like this:
SQL
SELECT * FROM MyTable WHERE As_Of_Date = '2014-02-28' OR As_Of_Date = '2014-01-31'
 
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