Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> sql question ???
Hi, I got a SQL question (9i on Red Hat), commands
shown below. The first sql returns 3 rows with value
1, so trim(client_company) = '', how come the 2nd sql
doesn't return anything??
SQL> select decode(trim(client_company), '', 1, ' ',
2, null, 3, 4) from cli_clients where
cli_id in (257, 396, 727);
DECODE(TRIM(CLIENT_COMPANY),'',1,'',2,NULL,3,4)
1 1 1
3 rows selected.
SQL> select count(*) from cli_clients where trim(client_company) = '' and cli_id in (257, 396, 727);
COUNT(*)
0
1 row selected.
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Mar 06 2003 - 14:09:32 CST
![]() |
![]() |