Last post Nov 17, 2010 03:13 AM by smirnov
Nov 17, 2010 02:59 AM|rock_420|LINK
Hello All ,
I have a requirement like i have bulk of excel data which i have do validate and if it is okay then i need to insert the data in the DB .
Validations includes like datatype, length, precision.. etc ... Wil ahve thousands of records.
Earlier validation was done in the Stored procedure side where the developer moved the data to the temp table and loop through each row and validate it . But we are acing performace isues and some time time out error as well.
So i thought of silution like , Convert the execl data to datattable and validate the data in UI instead of the DB.
Can some one tell me whether my approcah is right or still any other approcah is there ?
Please provide ur valuable suggestions.
Nov 17, 2010 03:13 AM|smirnov|LINK
Maybe it would be easier to update current behavior? You said, you loop through each row, I believe using a cursor. This is definitely the bottleneck there. Why don't you validate all records together? e.g.
if exists(select * from temp where len(name)>100))