IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage SQL Discussion :

"No more processes"


Sujet :

Langage SQL

  1. #1
    Membre habitué
    Inscrit en
    Avril 2005
    Messages
    8
    Détails du profil
    Informations forums :
    Inscription : Avril 2005
    Messages : 8
    Par défaut "No more processes"
    Bonjour,

    Je fais encore appel à vos connaissances car je bloque depuis un petit moment sur ce problème.

    Voici le script que je dois exécuter sur ma base :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
     
            CREATE TEMP TABLE tempTableInputSlot (
                    dslam VARCHAR(8),
                    shelf VARCHAR(2),
                    slot INTEGER
            ) WITH NO LOG;
     
            CREATE TEMP TABLE tempTableInputSlot2 (
                            shelf VARCHAR(8),
                            slot INTEGER
            ) WITH NO LOG;
     
            CREATE INDEX tempTableInputSlot_indShelf ON tempTableInputSlot(shelf);
            CREATE INDEX tempTableInputSlot_indDslam ON tempTableInputSlot(dslam);
     
     
            LOAD FROM '$FILE_INPUT_NODE'
            DELIMITER ';'
            INSERT INTO tempTableInputSlot (dslam,shelf,slot);
     
            UPDATE tempTableInputSlot set shelf="0"||shelf where LENGTH(shelf)=1;
     
     
            INSERT INTO tempTableInputSlot2 Select Equip.id,tempTableInputSlot.slot
            From tempTableInputSlot
            INNER JOIN manelem on tempTableInputSlot.dslam = manelem.x3024_3_mychars
            INNER JOIN Equip on Equip.x3011_9_cmMe = manelem.id and Equip.x3011_1_mychars[9,11] = "L"||tempTableInputSlot.shelf;
     
            CREATE PROCEDURE braProc_updateShelfRemarks()
     
                    DEFINE w_slot INT;
                    DEFINE w_shelf CHAR(8);
                    DEFINE w_remarks CHAR(255);
     
                    FOREACH curr1 FOR
                    SELECT tempTableInputSlot2.shelf, tempTableInputSlot2.slot
                    INTO    w_shelf, w_slot
                    FROM    tempTableInputSlot2;
     
                    select X3011_18_mychars INTO w_remarks FROM EQUIP WHERE Equip.id=w_shelf;
     
                    LET w_remarks=SUBSTR(w_remarks,146,146+w_slot-1)||"O"||SUBSTR(w_remarks,147+w_slot-1,170);
     
                    update Equip set X3011_18_mychars=w_remarks where Equip.id=w_shelf;
            END FOREACH;
            END PROCEDURE;
     
            UPDATE STATISTICS FOR PROCEDURE braProc_updateShelfRemarks();
     
            EXECUTE PROCEDURE braProc_updateShelfRemarks();
     
            DROP PROCEDURE braProc_updateShelfRemarks;
            DROP TABLE tempTableInputSlot;
            DROP TABLE tempTableInputSlot2;
    Voici le résultat des logs obtenus :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
     
            CREATE TEMP TABLE tempTableInputSlot (
                    dslam VARCHAR(8),
                    shelf VARCHAR(2),
                    slot INTEGER
            ) WITH NO LOG;
    --Temporary table created.
     
     
     
            CREATE TEMP TABLE tempTableInputSlot2 (
                            shelf VARCHAR(8),
                            slot INTEGER
            ) WITH NO LOG;
    --Temporary table created.
     
     
     
            CREATE INDEX tempTableInputSlot_indShelf ON tempTableInputSlot(shelf);
    --Index created.
     
     
            CREATE INDEX tempTableInputSlot_indDslam ON tempTableInputSlot(dslam);
    --Index created.
     
     
     
            LOAD FROM 'slot.txt'
            DELIMITER ';'
            INSERT INTO tempTableInputSlot (dslam,shelf,slot);
    --1 row(s) loaded.
     
     
     
            UPDATE tempTableInputSlot set shelf="0"||shelf where LENGTH(shelf)=1;
    --0 row(s) updated.
     
     
     
            INSERT INTO tempTableInputSlot2 Select Equip.id,tempTableInputSlot.slot
            From tempTableInputSlot
            INNER JOIN manelem on tempTableInputSlot.dslam = manelem.x3024_3_mychars
            INNER JOIN Equip on Equip.x3011_9_cmMe = manelem.id and Equip.x3011_1_mychars[9,11] = "L"||tempTableInputSlot.shelf;
    --1 row(s) inserted.
     
     
     
            CREATE PROCEDURE braProc_updateShelfRemarks()
     
                    DEFINE w_slot INT;;
                    DEFINE w_shelf CHAR(8);;
                    DEFINE w_remarks CHAR(255);;
     
    FOREACH curr1 FOR
                            SELECT tempTableInputSlot2.shelf, tempTableInputSlot2.slot
                            INTO    w_shelf, w_slot
                            FROM    tempTableInputSlot2;;
     
                            select X3011_18_mychars INTO w_remarks FROM EQUIP WHERE Equip.id=w_shelf;;
     
                            LET w_remarks=SUBSTR(w_remarks,146,146+w_slot-1)||"O"||SUBSTR(w_remarks,147+w_slot-1,170);;
     
                            update Equip set X3011_18_mychars=w_remarks where Equip.id=w_shelf;;
    END FOREACH;
            END PROCEDURE;
    --Routine created.
     
    ;
     
            UPDATE STATISTICS FOR PROCEDURE braProc_updateShelfRemarks();
    --Routine Statistics updated.
     
     
     
            EXECUTE PROCEDURE braProc_updateShelfRemarks();
      --746: 23
     
    --No more processes
    --Error in line 1
    --Near character position 2
     
     
            DROP PROCEDURE braProc_updateShelfRemarks;
    --Routine dropped.
     
     
     
            -- Suppression des tables temporaires et des procedures
            DROP TABLE tempTableInputSlot;
    --Table dropped.
     
     
            DROP TABLE tempTableInputSlot2;
    --Table dropped.
    Je ne comprends pas l'erreur "No more processes". Quand je supprime la requête "INSERT" juste avant la déclaration de la procédure, tout fonctionne. De même, lorsque je supprime la requête "UPDATE" dans la procédure, ça fonctionne aussi. Mais quand je laisse les 2, j'obtiens ce message d'erreur.

    Est-ce que quelqu'un aurait une idée ?

  2. #2
    Rédacteur

    Avatar de SQLpro
    Homme Profil pro
    Expert bases de données / SQL / MS SQL Server / Postgresql
    Inscrit en
    Mai 2002
    Messages
    22 010
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Var (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Expert bases de données / SQL / MS SQL Server / Postgresql
    Secteur : Conseil

    Informations forums :
    Inscription : Mai 2002
    Messages : 22 010
    Billets dans le blog
    6
    Par défaut
    1) WITH NO LOG n'existe pas en SQL
    2) les chaines de caractères se délimitent par des apostrophes en SQL par par des guillemets
    3) LOAD FROM n'existe pas en SQL
    4) UPDATE STATISTICS n'existe pas en SQL

    A +
    Frédéric Brouard - SQLpro - ARCHITECTE DE DONNÉES - expert SGBDR et langage SQL
    Le site sur les SGBD relationnels et le langage SQL: http://sqlpro.developpez.com/
    Blog SQL, SQL Server, SGBDR : http://blog.developpez.com/sqlpro
    Expert Microsoft SQL Server - M.V.P. (Most valuable Professional) MS Corp.
    Entreprise SQL SPOT : modélisation, conseils, audit, optimisation, formation...
    * * * * * Expertise SQL Server : http://mssqlserver.fr/ * * * * *

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo