Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2008-09-09 : 11:26:31
|
| Hi All,I have a CSV variable in a SP, that builds up a CSV & returns a status code to the .net pagePROBLEM VS SOLUTION (Whats the best way to achieve this ? )1. Do I save the CSV file into a varchar(max) column and delete it after execution is complete ?OR2. Do I rebuild the csv all over again ?(A trigger calls a SP to process the CSV values that had a status of 0)If option 1 is better, once the processing has been done the column is deleted.If option 2 is chosen, then the calling SP has to do a select in the table and rebuild the string, before processing the valuesWhats the best option here ?thanksYes O ! |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-09-09 : 11:50:23
|
May we see your code so that we can understand?You should strive to normalize your data.INSERT all values in CSV parameter into a table and join that table later. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2008-09-09 : 12:02:04
|
| My code is long. Its basically...1. A CSV passed to a SP2. A split function that loops thru and checks to make sure each value meets a certain standard3. If everything is ok, it passes a status back to the calling appIt then makes a log and a trigger is fired to execute a .dll which processes the csv with correct values. Completely transparent to the user.PROBLEM1. Its either the .dll component does a select to retrieve the values afreshor2. It just assigns the csv to a column and the dll retrieves the valuewhich is best ?Yes O ! |
 |
|
|
|
|
|