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

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Need to t-sql to below logic

Author  Topic 

srinivasu.seela
Starting Member

1 Post

Posted - 2014-08-26 : 09:21:30
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.




gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-08-26 : 20:38:15
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
   

- Advertisement -