I would like to only showing rows with a fixed length
I have several rows with client's number, and by the national length all the telephones number must only have 11 characters, but I have some data with 8 characters, or even with only zeros.
And I need to show, only those rows with 11 characters in it, and don't show the rest of the data
My code would be like this:
SELECT
Codclie
, Descrip AS [Name]
, SUBSTRING(Telef,1,11) AS [Telephone]
, CAST(FechaE AS DATE) AS [first sale]
FROM
WHERE
Telef <> ''
AND
Telef NOT LIKE ('00%')
ORDER BY
CAST(FechaE AS DATE) DESC
