Skip to content
Advertisement

SQL to get whole words till end from the keyword

Consider I have text from the field (notes) as below:

I want a SQL query which fetches the link part only. That is to find keyword http and print till the last.

Output:

Also if the text field doesnt have any link, can we print NA?

Advertisement

Answer

For SQL Server you can consider this below logic-

For MySQL-

In case of select query using table, queries will be-

To apply ‘NA’ when no link available, please use the below logic-

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement