| |
Sponsored Links
Oracle DECODE , Oracle INSTR , Oracle INITCAP ,INSTRB
Oracle DECODE function IF x THEN return y ELSE return z
select DECODE('A','B','True','False') from dual
Result : False
select DECODE('A','A','True','False') from dual
Result : True
Oracle INITCAP(char) function
String with Initial Capitals
select initcap('oracle') from dual
Result : Oracle
select initcap('oracle database') from dual
Result : Oracle Database
Oralce INSTR
INSTR(str, chars[,s[,n]]) Find the 'n'th occurence of 'chars' in 'str' Starting at position 's'
n and s default to 1
select instr('oracle database','a') from dual
Result: 3
select instr('oracle database','a',6) from dual
Result : 9
select instr('oracle database','a',6,2) from dual
Result : 11
select instr('oracle database','a',6,2) from dual
Result : 11
INSTRB (str, chars[,s[,n]])
The same as INSTR, except that 's' and the return value are expressed in bytes,
use for double-byte char sets
Page 1
|
|
|