Re: find column name that has under score (_)

Поиск
Список
Период
Сортировка
Искать
От
David Johnston
Тема
Re: find column name that has under score (_)
Дата
Msg-id
049401cbced5$fa929f20$efb7dd60$@yahoo.com
Ответ на
Список
Дерево обсуждения
find column name that has under score (_) akp geek <akpgeek@gmail.com>
Re: find column name that has under score (_) "David Johnston" <polobo@yahoo.com>
Re: find column name that has under score (_) David Kerr <dmk@mr-paradox.net>
Re: find column name that has under score (_) akp geek <akpgeek@gmail.com>
Re: find column name that has under score (_) hubert depesz lubaczewski <depesz@depesz.com>
Re: find column name that has under score (_) Radosław Smogura <rsmogura@softperience.eu>
Re: find column name that has under score (_) akp geek <akpgeek@gmail.com>

Try just using the string function “position”.  You’ll need to check the documentation or wait for others to determine which specific system views you will need to obtain the column name (if you do not already know that part).

 

position(substring in string) int

 

Non-Zero (or maybe >= 0) indicates the substring was found – though I would test with some known sample data just to make sure before running it on the column names.

 

Dave

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of akp geek
Sent: Thursday, February 17, 2011 1:56 PM
To: pgsql-general
Subject: [GENERAL] find column name that has under score (_)

 

Hi all -

 

          I am trying to write a query to find all the column names in database that has a underscore in it (_) example souce_id. I know like will not work , if where column_name like '%_%' Can you please help?

 

Regards

 

В списке pgsql-general по дате отправления
От: akp geek
Дата:
От: David Kerr
Дата:
FAQ