Bonjour à tous.
J'aimerais savoir s'il existe une fonction PlSql qui retourne la position d'un caractère en partant de la fin d'une chaîne.
C'est à dire du genre INSTR mais retourne la dernière occurence.
Merci d'avance.
Bonjour à tous.
J'aimerais savoir s'il existe une fonction PlSql qui retourne la position d'un caractère en partant de la fin d'une chaîne.
C'est à dire du genre INSTR mais retourne la dernière occurence.
Merci d'avance.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 Connecté à : Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.5.0 - Production SQL> SELECT INSTR('zappa','a',-1) FROM dual 2 / INSTR('ZAPPA','A',-1) --------------------- 5 SQL>
INSTR(char1, char2 [,n [,m]])
Searches Char1 beginning with its Nth character for the Mth occurrence of Char2 and returns the position of the character in Char1 that is the first character of this occurrence.
If N is negative, Oracle counts and searches backward from the end of Char1. N and M default to 1.
EDIT
gâââââ... encore une fois grillé sur le fil !
Partager