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 2000 Forums
 SQL Server Development (2000)
 About Select statement .

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-10-17 : 16:30:30
Sanjeev writes "Dear SQL Team ,
My table is like this ..
-----------------------------------------------------------------
select EmpId,FromDate,ToDate,LeaveType from tblEmployee
-------------------------------------------------------------
EmpId FromDate ToDate LeaveType
------- --------- --------- ------------
0309 2001-10-15 2001-10-20 AL
0315 2001-11-01 2001-11-03 SL
----------------------------------------------------------------


** MY QUESTION- Is it possible to get result like below in single select statement, with out using #temp table or store procedure? I need this because I have 50 thousands data and it takes too much time if I use temporary tables.

EmpId                    Date                   LeaveType 
------- -------- --------------
0309 2001-10-15 AL
0309 2001-10-16 AL
0309 2001-10-17 AL
0309 2001-10-18 AL
0309 2001-10-19 AL
0309 2001-10-20 AL
0315 2001-11-01 SL
0315 2001-11-02 SL
0315 2001-11-03 SL
--------------------------------------------------------------

"
   

- Advertisement -