Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Update statistics job is failing Expand / Collapse
Author
Message
Posted Tuesday, October 8, 2013 8:53 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Saturday, August 30, 2014 7:19 AM
Points: 980, Visits: 5,112
GilaMonster (10/8/2013)
A better solution might be to change the column to numeric. Or is that not possible?


That was my first suggestion, but according to the Dev, the people who send him the data basically told him "we make no promises it'll be in the correct format, and you're on your own once we send it to you."

I've suggested long-term it would be better to catch "bad" data on the import side, but he's thinking the app is going away soon enough that it wouldn't be worth the effort to fix / improve / replace the BCP import with an SSIS package.
Post #1502665
Posted Tuesday, October 8, 2013 9:02 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 10:05 AM
Points: 42,829, Visits: 35,961
In that case may I suggest a simple after/instead of insert trigger to check for (and fix) invalid data?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1502670
Posted Tuesday, October 8, 2013 9:18 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Saturday, August 30, 2014 7:19 AM
Points: 980, Visits: 5,112
I'm presuming that such a trigger would have better performance than the function (function has to work on every row where the computed column is selected, trigger catches the problem at the beginning)

I'll look into this, and work with the Dev on implementing one. Something to check for and replace anything non-numeric (depending on the requirements, maybe just strip it out)

I suspect we can start with the function as a foundation, just improve it some.

Once more, thanks Gail!
Post #1502678
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse