output a single and double quote in a string

From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: output a single and double quote in a string
Date: 2005-03-18 21:41:21
Message-ID: 20050318213530.M19576@narrowpathinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi All,

I am trying to create output that contains a dimension and the user would like
to see single quote for feet and double quote for inches. I have not as yet
stumbled on the solution.

SELECT length_ft::text || \' ||
length_in::text || \" AS length_dim,
width_ft::text || \' ||
width_in::text || \" AS width_dim
FROM sales_order.tbl_net_production;

Kind Regards,
Keith

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-03-18 21:57:51 Re: Query optimization
Previous Message Ryan Riehle 2005-03-18 20:23:05 Query optimization