-1
If the text follows this pattern you can do a search with the LIKE
:
SELECT t.*
FROM tabela t
WHERE t.descricao LIKE '%, validade %2019%, dívida%';
-1
0
If the text follows this pattern you can do a search with the LIKE
:
SELECT t.*
FROM tabela t
WHERE t.descricao LIKE '%, validade %2019%, dívida%';
-1
I am only trying to get from the Validity until 2019
Try something like
-- código #1 v3
...
case when charindex (', validade ', DescricaoAndamento) > 0
then substring (DescricaoAndamento,
charindex (', validade ', DescricaoAndamento) +2,
19)
else NULL end
...
The code snippet above initially searches where it starts the text ", validity ".
It was considered that the expiry date will always contain 10 characters.
Browser other questions tagged sql sql-server tsql
You are not signed in. Login or sign up in order to post.
Will the "validity" text always exist in the Description column? The date is always in the dd/mm/yyyy format ?
– José Diz