substring

Поиск
Список
Период
Сортировка
От Nuchanard Chiannilkulchai
Тема substring
Дата
Msg-id 37247EC0.AA67A0F5@valigene.com
обсуждение исходный текст
Список pgsql-sql
Hello,
   How should I do my query to put a substring value in a field, in
postgres ( I have 6.4) ?

I have  in table table_a
a
----------------
98-004_c136
P124_154
98-005_c171

and i want to select only the text before the underscore:

in sybase, this should beselect a, substring(a,1,charindex('_',a)-1)  from table_aa----------------
----------------98-004_c136     98-00498-005_c171      98-005P124_154         P124
 
   Thanks a lot,   Nuch





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

Предыдущее
От: José Soares
Дата:
Сообщение: Re: [SQL] Primary Key Bugs
Следующее
От: "Justin Long"
Дата:
Сообщение: CURRVAL(INDEX)