Précédent   Forum des professionnels en informatique > Bases de données > Oracle
Oracle Forum Oracle : le serveur, les outils, ... Voir F.A.Q Oracle Tutoriels Oracle
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 20/02/2007, 12h12   #1
Invité régulier
 
Inscription : février 2006
Messages : 27
Détails du profil
Informations forums :
Inscription : février 2006
Messages : 27
Points : 7
Points : 7
Par défaut [Oracle] Code source function

bonjour,

je lance une fonction de la manière suivante:

Code :
SELECT op.compute_valo.compute_valo_ct(11, '06-JUL-98', 'VA') FROM dual
mais ça plante:

Code :
1
2
12:08:02 : Ligne 1 : KEY violation.
[Oracle][ODBC][Ora]ORA-06553: PLS-306: wrong number OR types of arguments IN call TO 'COMPUTE_VALO_CT'
je souhaite voir le code source de cette fonction pour voir où est le pb.

Merci d'avance!
glogla est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/02/2007, 14h44   #2
Membre expérimenté

 
Avatar de NGasparotto
 
Nicolas Gasparotto
Inscription : janvier 2007
Messages : 424
Détails du profil
Informations personnelles :
Nom : Nicolas Gasparotto

Informations forums :
Inscription : janvier 2007
Messages : 424
Points : 500
Points : 500
Regarde TEXT dans ALL_SOURCE ordonné par LINE.

Ou bien un desc de ta fonction te donnera tous les paramètres.

Nicolas.
NGasparotto est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/02/2007, 14h44   #3
Rédacteur/Modérateur
 
Avatar de orafrance
 
Inscription : janvier 2004
Messages : 15 861
Détails du profil
Informations personnelles :
Âge : 35

Informations forums :
Inscription : janvier 2004
Messages : 15 861
Points : 16 212
Points : 16 212
Code :
DESC op.compute_valo.compute_valo_ct
pour voir les paramètres ou all_source pour voir le code

PS : merci de penser aux balises à l'avenir
orafrance est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/02/2007, 15h44   #4
Membre habitué
 
Inscription : février 2007
Messages : 216
Détails du profil
Informations personnelles :
Localisation : Maroc

Informations forums :
Inscription : février 2007
Messages : 216
Points : 115
Points : 115
pour voir le code source de cette fonction :
Code :
SELECT * FROM all_source WHERE name='op.compute_valo.compute_valo_ct'
elharet est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/02/2007, 15h46   #5
Rédacteur/Modérateur
 
Avatar de orafrance
 
Inscription : janvier 2004
Messages : 15 861
Détails du profil
Informations personnelles :
Âge : 35

Informations forums :
Inscription : janvier 2004
Messages : 15 861
Points : 16 212
Points : 16 212
non, le code exact est :

Code :
SELECT text FROM all_source WHERE name='COMPUTE_VALO' AND owner = 'OP'
ce qui permettra de voir tout le package COMPUTE_VALO et donc la fonction aussi
orafrance est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 20/02/2007, 15h49   #6
Membre habitué
 
Inscription : février 2007
Messages : 216
Détails du profil
Informations personnelles :
Localisation : Maroc

Informations forums :
Inscription : février 2007
Messages : 216
Points : 115
Points : 115
merci FRED.
elharet est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 12h00   #7
Invité régulier
 
Inscription : février 2006
Messages : 27
Détails du profil
Informations forums :
Inscription : février 2006
Messages : 27
Points : 7
Points : 7
Merci,

malheureusement, ca na pas l'air de fonctionner.
Voici le résultat de

Code :
SELECT text FROM all_source WHERE name='COMPUTE_VALO' AND owner = 'OP'

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    OWNER NAME TYPE LINE TEXT 
1 OP COMPUTE_VALO PACKAGE 1 PACKAGE    compute_valo AS
 
2 OP COMPUTE_VALO PACKAGE 2 FUNCTION compute_valo_ct (
 
3 OP COMPUTE_VALO PACKAGE 3 v_num_ope int ,
 
4 OP COMPUTE_VALO PACKAGE 4 v_date_val date ,
 
5 OP COMPUTE_VALO PACKAGE 5 v_hypothesis varchar2,
 
6 OP COMPUTE_VALO PACKAGE 6 v_taux1 IN OUT number,
 
7 OP COMPUTE_VALO PACKAGE 7 v_taux2 IN OUT number,
 
8 OP COMPUTE_VALO PACKAGE 8 v_cours_spot IN OUT number,
 
9 OP COMPUTE_VALO PACKAGE 9 v_cours_terme IN OUT number)
 
10 OP COMPUTE_VALO PACKAGE 10 RETURN number ;
 
11 OP COMPUTE_VALO PACKAGE 11 PRAGMA RESTRICT_REFERENCES (compute_valo_ct, wnds, wnps) ;
 
12 OP COMPUTE_VALO PACKAGE 12 
 
13 OP COMPUTE_VALO PACKAGE 13 FUNCTION compute_valo_fra (
 
14 OP COMPUTE_VALO PACKAGE 14 v_num_ope int ,
 
15 OP COMPUTE_VALO PACKAGE 15 v_date_val date ,
 
16 OP COMPUTE_VALO PACKAGE 16 v_hypothesis varchar2)
 
17 OP COMPUTE_VALO PACKAGE 17 RETURN histo_operation.nominal_1%TYPE;
 
18 OP COMPUTE_VALO PACKAGE 18 PRAGMA RESTRICT_REFERENCES (compute_valo_fra , wnds, wnps);
 
19 OP COMPUTE_VALO PACKAGE 19 END;
 
20 OP COMPUTE_VALO_FCT PACKAGE 1 PACKAGE    compute_valo_fct AS
 
21 OP COMPUTE_VALO_FCT PACKAGE 2 FUNCTION compute_valo_ct_fct (
 
22 OP COMPUTE_VALO_FCT PACKAGE 3 v_num_ope int ,
 
23 OP COMPUTE_VALO_FCT PACKAGE 4 v_date_val date ,
 
24 OP COMPUTE_VALO_FCT PACKAGE 5 v_hypothesis varchar2)
 
25 OP COMPUTE_VALO_FCT PACKAGE 6 RETURN number ;
 
26 OP COMPUTE_VALO_FCT PACKAGE 7 PRAGMA RESTRICT_REFERENCES (compute_valo_ct_fct, wnds, wnps) ;
 
27 OP COMPUTE_VALO_FCT PACKAGE 8 FUNCTION compute_valo_fra_fct (
 
28 OP COMPUTE_VALO_FCT PACKAGE 9 v_num_ope int ,
 
29 OP COMPUTE_VALO_FCT PACKAGE 10 v_date_val date ,
 
30 OP COMPUTE_VALO_FCT PACKAGE 11 v_hypothesis varchar2)
 
31 OP COMPUTE_VALO_FCT PACKAGE 12 RETURN histo_operation.nominal_1%TYPE;
 
32 OP COMPUTE_VALO_FCT PACKAGE 13 PRAGMA RESTRICT_REFERENCES (compute_valo_fra_fct , wnds);
 
33 OP COMPUTE_VALO_FCT PACKAGE 14 END;
glogla est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 12h14   #8
Expert Confirmé
 
Homme
Chef de projet en SSII
Inscription : janvier 2004
Messages : 2 866
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Loire Atlantique (Pays de la Loire)

Informations professionnelles :
Activité : Chef de projet en SSII
Secteur : Conseil

Informations forums :
Inscription : janvier 2004
Messages : 2 866
Points : 3 448
Points : 3 448
Cela m'étaonnerait que tu aies tapé la requête citée, tu n'aurais pas les colonnes OWNER, NAME, TYPE, LINE ...
__________________
Un problème sans solution est un problème mal posé

Merci de poser vos questions sur le forum, je ne réponds pas aux questions posées par MP.
plaineR est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 13h28   #9
McM
Expert Confirmé Sénior
 
Inscription : juillet 2003
Messages : 3 450
Détails du profil
Informations forums :
Inscription : juillet 2003
Messages : 3 450
Points : 4 209
Points : 4 209
Dans la requete, manquait le tri des lignes.
Code :
1
2
SELECT text FROM all_source WHERE name='COMPUTE_VALO' AND owner = 'OP'
ORDER BY line
__________________
More Code : More Bugs. Less Code : Less Bugs
McM est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 13h56   #10
Invité régulier
 
Inscription : février 2006
Messages : 27
Détails du profil
Informations forums :
Inscription : février 2006
Messages : 27
Points : 7
Points : 7
effectivement...
Voila ce que j'ai tapé:

Code :
SELECT * FROM all_source WHERE name LIKE '%COMPUT%' ORDER BY name,line
glogla est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 15h35   #11
Nouveau Membre du Club
 
Inscription : février 2005
Messages : 42
Détails du profil
Informations personnelles :
Âge : 35
Localisation : France, Paris (Île de France)

Informations forums :
Inscription : février 2005
Messages : 42
Points : 25
Points : 25
Bonjour,

Vous n'avez pas les privélèges pour visualiser le body du package. (je pense que le privelege qui manque est "Create any procedures")
gentarik est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/03/2007, 15h52   #12
Invité régulier
 
Inscription : février 2006
Messages : 27
Détails du profil
Informations forums :
Inscription : février 2006
Messages : 27
Points : 7
Points : 7
Merci, je ne suis pas sysdba donc je ne pourrais pas voir ce qu'elle fait cette fonction de m....
Merci quand même!
glogla est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 04h33.


 
 
 
 
Partenaires

Hébergement Web