Re: string function

Frank Bax <[email protected]>
Newsgroups gmane.comp.db.postgresql.php
Message-ID <[email protected]>
gunartha wrote:
> select left(kd_aln,2) as code from airlin
> 
> the error msg is : function left(character varying, integer) does not exist
> 


For a complete list of string functions, look here:

http://www.postgresql.org/docs/8.2/interactive/functions-string.html

Perhaps you meant to use ...

select substr(kd_aln,1,2) as code from airlin


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.