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
Saafia NM
NA
52
11.1k
SQL command to get two row values in single row
Feb 16 2016 2:24 AM
TableName:Upload
ID
Keyword
1116
Dot Net
2836
Dot Net
5636
Dot Net
TableName:Index_list (Resultant Table)
ID
Keyword
1116,2836,5636
Dot Net
Sir i need the sqlcommand query to get resultant table in asp .net(c# language)
I tried the following command,but it gives the result same as Upload table.
SqlCommand cmnd= new SqlCommand("select Upload.Keyword,ID=replace((select ID as [data()] from Index_list where Index_list.Keyword=Upload.Keyword order by ID for XML PATH('')),'',',') from Upload group by Keyword", con);
it works in SQL Server Management Studio,but not in Visual Studio 2012 sqlcommand .Please help.....
Reply
Answers (
14
)
I want to send email & to get list failed to send emails
how to iconoverlay in c# project