With SQL Server you can use the CHARINDEX and CHAR functions:
Code:
SELECT * FROM yourtable
WHERE CHARINDEX(CHAR(13)+CHAR(10),yourcolumn)>0;
will find strings which contain CR/LF.
You should prevent the inclusion of these 'bad' characters in your client code. If your requirements dictate that a string may not contain CR/LF, then this is an enforcement of a business rule which is best handled at the client.
If you use a stored procedure to do your updates, you could also search any input string parameter using code similar to the CHARINDEX snippet above and SUBSTRING out the CR/LF. Languages like T/SQL aren't very efficient doing character string manipulation, so this is better handled at the client, IMO.
Jeff Mason
Custom Apps, Inc.
www.custom-apps.com