Thursday, June 27, 2013

[SQL Server] Explanation of LIKE '%[0-9]%'?

[SQL Server] Explanation of LIKE '%[0-9]%'?


Explanation of LIKE '%[0-9]%'?

Posted: 27 Jun 2013 01:06 AM PDT

From time to time I need to check if a column is completely numeric (or usually, check for the row contain something other than numeric). I've read the ISNUMERIC has problems. I've used LIKE '%[0-9]%'? successfully, but even after reading around in several places I still don't understand how it works. And I don't want to use anything I can't support. Would someone mind giving me a blow by blow explanation of what each "thing" is doing here? (And if the statement needs to be improved please do so. I've seen some use a ^ in the statement before).

Issue with triggers following migration

Posted: 26 Jun 2013 07:35 PM PDT

Ugh, sorry for all the questions. I've inherited this system I know very little about, and everybody else has quit, so I'm having to try and work everything out backwards, without any documentation or history.We have one database system (a) on which when a new record is entered, a trigger (actually several) is meant to fire and update another database (b) on the same instance of SQL Server 2008 R2 (SP2). It was all working fine until we migrated (backup & restore) the databases to new VMs. Database b is no longer being updated when a new record is inserted on database a (via the front-end). I've run a trace, and the trigger does seem to be firing (which it should, because I checked that they weren't disabled). If the update's not happening does this suggest a permissions issue or something? What might be preventing one database interacting with another in this case (bearing in mind that they're on the same default instance).Does anything spring to mind? Thanks.

No comments:

Post a Comment

Search This Blog