select like that returns a Sting without line break

Asked

Viewed 148 times

1

I am using the following query:

select distinct con_destinatario from tab_conhecimento where con_destinatario like '%CALLE%' order by con_destinatario;

and get several results of this type:

    A.S. OPORTUNIDADES Y NEGOCIOS S.R.L.
    CALLE TTE. ROJAS SILVA CASI REDUCCION MELODIA
    VILLA HAYES - PARAGUAY

I would like the query to consider only the first line before the line break someone is enabled?

  • In the bank a Return Carriage must be saved , a replace must resolve, REPLACE(col, CHAR(13, 10), '')

1 answer

1


GOT IT THIS WAY:

select distinct con_destinatario from tab_conhecimento where con_destinatario like '%CALLE%' AND con_destinatario NOT LIKE '%
%CALLE%' order by con_destinatario;

Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.