JoNTSQLSrv (8/2/2013) Phil Parkin (8/2/2013)
You can probably get quite close through the use of PATINDEX
and diligent use of wildcards
. Have you tried this?
PATINDEX is just retrieving the index value , but how come this will validate the user input value ?
could you please show me some related example ?
..And if the desired pattern is not found, it will return zero. That is how you test. You can apply repeated tests to look for different things in your proc, if necessary.
There are thousands, if not millions, of examples on the Internet if you take the time to search for them.
Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this
If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.
Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.