TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Manish Kumar
NA
1.4k
8.3k
Employee leave day
Apr 22 2016 4:04 AM
Hi,
I have a table like below structure
declare @tbl table
(empid int,noOfDay int,leavedate datetime)
insert into @tbl values (001,2,'2016-04-22'),(002,1,'2016-01-18'),(003,3,'2005-07-14')
and data is like
empid noOfDay leavedate
---------------------------------------
001 2 2016-04-22
002 1 2016-01-18
003 3 2005-07-14
i want my out put result in below format
empid noOfDay leavedate
---------------------------------------
001 1 2016-04-22
001 1 2016-04-22
002 1 2016-01-18
003 1 2005-07-14
003 1 2005-07-14
003 1 2005-07-14
Thanks in advanced.
Regards,
Manish
Reply
Answers (
3
)
Query that returns all tables order by Primary foreign const
How to split values in sql? table column im having (1,2,3,4)