Aswanth (5/29/2008)
I'm Using Asp.Net with C#..i'm having One ListBox control in which I'm getting Data Dynamically.. I want to Insert the Selected data (or ALL DATA) from ListBox Control into My Table(Get_Data) in Sql Server Database.. Here I'm displaying NAMES(EMP_Names) in LISTBOX Control.. I want to Insert there ID(EMP_ID) values instead of NAMES..
EVEN some times MULTIPLE SELECTIONS will also been done in LISTBOX Control.. I want to INSERT those MULTIPLE values in ONE COLUMN as COMMA SEPERATED VALUES (ex:1,2,3,4,5,6,7----)..
How to do this..
Please give me the code..
Thank You..
I think this article may help you out.
http://www.sqlservercentral.com/articles/TSQL/62867/
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes