Home » SQL & PL/SQL » SQL & PL/SQL » need a query for following description
need a query for following description [message #632336] Thu, 29 January 2015 03:43 Go to next message
pmrnk03
Messages: 3
Registered: January 2015
Junior Member
I hav a table with id startdate and finish date
1. 10-02-2012. 25-10-2012
1. 31-11-2012. 19-9-2013
1. 30-10-2013. 15-5-2015
2. 10-01-2011. 25-10-2012
2 31-11-2012. 19-9-2013
2 30-10-2014. 15-5-2015
I need a query where I have to find the diff bw the first finishdate and the next start date
With following criteria
The date of enrolment shld be btwn 1st nov 2013 and 31 dec 2014
Thr shld be not more thn 30 days of gap betwn two enrollments...
Can any one please help me out with this query..
Re: need a query for following description [message #632337 is a reply to message #632336] Thu, 29 January 2015 03:44 Go to previous messageGo to next message
pmrnk03
Messages: 3
Registered: January 2015
Junior Member
Ms sql 2012
Re: need a query for following description [message #632339 is a reply to message #632337] Thu, 29 January 2015 03:47 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Note that this is an Oracle forum; note that help you might receive here doesn't have to work on MS SQL Server. Consider asking for help elsewhere.
Re: need a query for following description [message #632342 is a reply to message #632337] Thu, 29 January 2015 03:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Also, before posting any question, in any forum, you should first read its rules.
Here they are there: OraFAQ Forum Guide.

Re: need a query for following description [message #632345 is a reply to message #632339] Thu, 29 January 2015 03:57 Go to previous message
pmrnk03
Messages: 3
Registered: January 2015
Junior Member
Thanks alot
Previous Topic: Query taking too long to execute and then throws an error. Need to change the SQL query
Next Topic: ora-12096 error in materialized view (2 threads merged by bb)
Goto Forum:
  


Current Time: Thu Apr 18 19:06:44 CDT 2024