I am trying to take a column that stores a id # for a webpage on a site and store it with the full url.
If the Article ID is 5. I want it to store return something like this
<a href="http://website.com/5">5</a>
What I am trying to do is combine a string put in the search and a number to make a URL for the column. I know this syntax is incorrect but I can not find anyway on how to do it.
SELECT
CASE
WHEN m_tableFoo.articleId = '0' THEN
'Not Applicable'
ELSE '<a href="http://website.com/'+m_tableFoo.articleId+'/">'+m_tableFoo.articleId+'</a>'
END AS articleID
from m_tableFoo
I have tried searching the web and Stack Overflow, but I am not sure if my search wording is incorrect or my description.
oracle uses ||
for concatenation, not +
. You will probably also need to TO_CHAR
the article ids
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With