Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

Next:From: Tom LaneDate: 2005-03-18 21:57:51
Subject: Re: Query optimization
Previous:From: Ryan RiehleDate: 2005-03-18 20:23:05
Subject: Query optimization

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group