Is there any way to filter by the output format in sql server.
Below is my output :
SQLOutput
AB-123456-99 Checker
123456-10000-00 2016
111119-20000-00 2016
How can I get the expected output as below,
the query should exclude all the column values which are in the format
123456-10000-00 -- xxxxxx-xxxxx-xx
If the column output has this format that value should be excluded from results.
and my final output should be as below :
SQLOutput
AB-123456-99 Checker
Please help if there is any way to get this.
123456-10000-00 2016
does not have a-
between00
and2016
. Then you said exclude any with format123456-10000-00 -- xxxxxx-xxxxx-xx
. Is all your output will haveAB
(or any 2 English alphabets) at the beginning andChecker
at the end? Does case matter?xxxxxx-xxxxx-xx
, rows where any column matches said pattern, or leave rows in place, blanking out columns that match the pattern. I'm assuming the first option, but your question as stated isn't clear. In your examples, are2016
andChecker
a second column, or part of the first column? If part of the first column, then are you looking for columns that start with the pattern? that contain the pattern? Also - DDL for the table(s), and the current query would help.