I "inherited" a program that reads from a .csv. Recently I've been having to add new records to this file and it's the most mind numbing boring thing in the world, so I decided to make it easier. Currentlly, I have to copy/paste an existing line and then copy/paste a few new fields over the existing fields. The majority of the data remains constant, and only a few fields are changed. What I'm going to do is create a web form that inserts the necessary new data into a SqlServer2005 db, and the database will export the table as a .csv for the program to read from (The program needs to read from a .csv, otherwise I would skip this step and have it read directly from the db).Here's an example of the .csv file:first_num, sec_num, const_1, const_2, email, const3076543,076543,1stConstant,2ndConstant,myemail@gmail.com,3rdConstant083617,083617,1stConstant,2ndConstant,newemail@gmail.com,3rdConstant578542,578542,1stConstant,2ndConstant,xtraemail@gmail.com,3rdConstant
^sorry, don't know why the above is underlined.It's basically acting as a flat file database.My question is, do I add the rows that are constant into my insert statement? ex:INSERT INTO Table (first_num, sec_num, const_1, const_2, email, const3)VALUES (@firstnum,@sec_num,'1stConstant','2ndConstant',@email,'3rdConstant')
or do I somehow have the constants populate automatically when a new record is generated?or, can I possibly add the constants when I'm exporting the table to a .csv? My problem is obviously a little more complex than the example, and there are multiple .csv files that are filled with slightly different sets of data. I'll design the db to store the data correctly, and write views that include only the necessary fields in the necessary order, and export those views. Thanks in advance. Let me know if you have any Q's.