Home How to add custom text on both sides of a result of a select query
Reply: 0

How to add custom text on both sides of a result of a select query

user768
1#
user768 Published in May 20, 2018, 3:40 pm

I am trying to create an SQL which adds custom text on both sides of the result of an SQL query in Postgres. I have many site domains stored in a database and I would like to copy them into an HTML file with the domain names inside an iframe. So I would like the query to return my domains within <iframe></iframe> tag. I found the following from the Postgresql documentation.

SELECT textcat(textcat(first_name,text ' '),last_name) from table; 

But what I am looking for is different. My simple select SQL would be

select site_domain from site where status = "active". 

Is there any function that allows me to append custom text on both sides of my result.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307614 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO