output a single and double quote in a string

Поиск
Список
Период
Сортировка
От Keith Worthington
Тема output a single and double quote in a string
Дата
Msg-id 20050318213530.M19576@narrowpathinc.com
обсуждение исходный текст
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Ryan Riehle"
Дата:
Сообщение: Query optimization
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Query optimization