From: | George Weaver <gweaver(at)shaw(dot)ca> |
---|---|
To: | KeithW(at)narrowpathinc(dot)com, PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: output a single and double quote in a string |
Date: | 2005-03-18 23:13:32 |
Message-ID: | 00c501c52c10$1d442030$6400a8c0@Dell4500 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
----- Original Message -----
From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "PostgreSQL Novice" <pgsql-novice(at)postgresql(dot)org>
Sent: Friday, March 18, 2005 3:41 PM
Subject: [NOVICE] output a single and double quote in a string
> 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.
How about
SELECT length_ft::text || chr(39)
length_in::text || \' " \' AS length_dim,
width_ft::text || chr(39) ||
width_in::text || \' " \' AS width_dim
FROM sales_order.tbl_net_production;
>
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Davis | 2005-03-19 01:29:41 | Re: Best way to input data |
Previous Message | Morgan Kita | 2005-03-18 23:10:36 | Best way to input data |