Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
14
Answers
SQL command to get two row values in single row
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Saafia NM
8y
487
1
Reply
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.....
Post
Reset
Cancel
Answers (
14
)
Next Recommended Forum
I want to send email & to get list failed to send emails
how to iconoverlay in c# project