|
Subject:
|
inserting values
|
|
Posted By:
|
sspr
|
Post Date:
|
2/15/2006 4:04:29 AM
|
is it possible to insert more than one value for any particular field in the table. like we can insert multiple mail id's separating them by commas. is it possible to do that in sql server
|
|
Reply By:
|
jbenson001
|
Reply Date:
|
2/15/2006 1:12:00 PM
|
You have to create a separate insert statement for each row. You can pass a stirng of IDs separated by commas and then split them up. However in the end, you are still creating one insert statement per ID.
Jim
|
|
Reply By:
|
rstelma
|
Reply Date:
|
2/15/2006 2:20:11 PM
|
You can insert data separated by commas without splitting the IDs but I wouldn't suggest that you do that. If you didn't split on the insert, you'd always have to split on the select. Plus, you're just asking for nothing but problems in the long run. Not only that, it violates the First Normal Form of database normalization:
"All attributes must be atomic, that is, only one single value represented in a single attribute in a single instance of an entity." - SQL Server 2000 Database Design, WROX Press, pg. 148
If it was me, I wouldn't go there.
|