Bonjour,
j' aimerais convertir un integer au format text de type 00 ,01, 02 ...
de facon simple.
merci
Version imprimable
Bonjour,
j' aimerais convertir un integer au format text de type 00 ,01, 02 ...
de facon simple.
merci
Je ne vois aucun problème en rapport avec Interbase ou Firebird ...
Bonjour
il n' y a pas de probleme , j' ai fait une conversion de type 00,01 etc
mais je la trouve lourde , si quelqu' un la fait de fait de facon plus soft ( echange d' idée) ci joint ma facon de faire ;).
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 SET TERM ^ ; Create procedure PROC_INC_GG (V_NOM_ID VarChar(30)) Returns (V_INCREMENT_G VarCHAR(4) ) As Declare V_ID Integer ; Begin Select Substring(Max(GROUPE_ID) FROM 4 FOR 2) As Val From GROUPE_GRAISSAGE Where NOM_ID = :V_NOM_ID Into :V_ID ; If ( V_ID is null) then V_INCREMENT_G = 'GG00' ; Else Begin If (V_ID < 9) Then Begin V_ID = V_ID + 1 ; V_INCREMENT_G = 'GG0' || :V_ID ; end Else Begin V_ID = V_ID + 1 ; V_INCREMENT_G = 'GG' || :V_ID ; end end Suspend ; end ^ COMMIT WORK ^ SET TERM ;^
la fonction TO_CHARN(x,'00') fournie dans UDF4ORA http://perso.orange.fr/Udf4ORA/
permet la conversion demandée (mais c'est Windows only)
Slts
PAscal