|
Posted by --CELKO-- on 08/05/07 03:09
>> Comparing the CSV approach with the parameter approach below, which one do you consider more maintainable and supportable? <<
the repeated code is easy to maintain with a text edit, but let's talk
about portable code, how people should code, etc.
1) most people will not type in more than 10 to 25 parameters and they
*seldom* need to. When an input list gets long, you need to load a
table and scrub the data before you invoke the procedure.
2) what code do "CSV spliter" people write to hande strings like
'1,,,4', or 'NULL, NULL, 2' or '1, ''2.34'', 7' or whatever? there
is no parsing or error handling and therefore no data integrity.
>> Also consider the application will need one line per parameter used on the stored procedure. <<
unh? chunking will put related parameters on one line in a logical
contigous ordering.
>> This which takes milliseconds to edit in Management Studio....<<
if the code does not have to do validatiion and produce correct data,
who cares about a fast wrong answer? I was one of the first people to
do a CSV scan in a single SQL query. I wrote a kludge. I repent of
my evil.
[Back to original message]
|