You might have stuck in a position where you need all or certain values of a particular column as comma separated string in your application. What do you do in that case?
Well, the generic approach for this is return the DataTable and iterate its column while adding comma after each value and forming a string or
we can read the result in a DataReader and keep reading it till next while following the above mentioned approach.
If the database server performance is not a major issue for you and if you prefer to write less code, in that case...
Here is a quick solution to perform the same at the database level...
Well, the generic approach for this is return the DataTable and iterate its column while adding comma after each value and forming a string or
we can read the result in a DataReader and keep reading it till next while following the above mentioned approach.
If the database server performance is not a major issue for you and if you prefer to write less code, in that case...
Here is a quick solution to perform the same at the database level...