note 20278 added to function.ociresult

From: Date: Thu, 28 Mar 2002 12:35:39 +0000
Subject: note 20278 added to function.ociresult
Groups: php.notes 
Request: Send a blank email to php-notes+get-28332@lists.php.net to get a copy of this message
I am trying to get a list of the first character of a character string. SELECT distinct substr(version,1,1) as COL1 FROM SPHVVERS where Version is not null order by 1 This was working and then failed recently. I think it is because some of the strings now added contain a number as the first character. I found to get it to work I had to use decode statement. (To_Char did not work ) SELECT distinct decode (substr(version,1,1),'1','?','0','!',substr(version,1,1)) as COL1 FROM SPHVVERS where Version is not null order by 1 -- http://www.php.net/manual/en/function.ociresult.php http://master.php.net/manage/user-notes.php?action=edit+20278 http://master.php.net/manage/user-notes.php?action=delete+20278 http://master.php.net/manage/user-notes.php?action=reject+20278

« previous php.notes (#28332) next »