--- Amin Schoeib <[EMAIL PROTECTED]> wrote: > Hi, > Like I see there is no equivalent to the Oracle > decode Function > In Postgres.Is there maybe somebody who wrote decode > as a > Function?
The problem for any such body is that there is no one function possible in PostgreSQL that will cover all of the possible use cases of "decode" in Oracle. As I understand things, "decode" takes a variable number of arguments, for a variety of datatypes. In PostgreSQL you would need to create a separate "decode" function for every distinct set of arguments (number and datatypes) that you are likely to encounter. That would be a lot of work for a generalized case. You may be best served by searching your code for usage of "decode", and writing only those versions that you need. The coding for each one would be trivial, using "case" constructions. > > Schoeib > > 4Tek Gesellschaft für angewandte > Informationstechnologien mbH > Schoeib Amin > Tel. +49 (0) 69 697688-132 > Fax. +49 (0) 69 697688-111 > http://www.4tek.de > > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster