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
ahmed elbarbary
637
1.6k
281.9k
How to separate value exist on temp table dynamically separa
Mar 26 2020 6:54 AM
problem
How to separate value exist on temp table dynamically separated by comma ?
i work on sql server 2012 i need to separate field TeamName by comma
teamname ,teamname+'Date'
i need to loop to teamname filed in tmp table #Teams then separate by comma and every field will be next field + 'Date'
really #temp table #teams every time changed so i dont have static data so i need any way dynamically sepatae field
and second will be field+date
i need result as
Package,PackageDate,Parametric,ParametricDate,Scribing,ScribingDate,Lifecycle,LifecycleDate
CREATE
TABLE
#Teams
(
TeamId
int
,
TeamName nvarchar(200)
)
insert
into
#Teams(TeamId,TeamName)
values
(1,
'Package'
),
(2,
'Parametric'
),
(3,
'Scribing'
),
(4,
'Lifecycle'
)
Reply
Answers (
1
)
I am getting error "b" does not match table
getting wrong Total time