Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Need to t-sql to below logic
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 08/26/2014 :  09:21:30  Show Profile  Reply with Quote
Hi Team,

I required T-Sql code to implement my below logic.

In one of the scenario we need to convert opportunties into Demands and need to calculate starting and end date of the demands

for some project ,

1. in the the month January 2 developers required.
2. where as in the month of Feb only one developer required.
3. means two demands has been started at January .
4. In that one of the demand has been closed at Feb.
5. But one demand still continuing and ended at March 2014.

Jan-14 Feb-14 Mar-14
2 1 1

when we convert this opportunity into demand , it will look like as shown below

Demand Start_Date End_Date
1 Jan-14 Feb-14
2 Jan-14 Mar-14

please let me know incase of any other information required.

Flowing Fount of Yak Knowledge

2780 Posts

Posted - 08/26/2014 :  20:38:15  Show Profile  Reply with Quote
Please post:

1. CREATE TABLE statements to create test tables
2. INSERT INTO statements to populate the test tables with a range of test data
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000