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

PostgreSQL Discussion :

Newbie création de table


Sujet :

PostgreSQL

  1. #1
    Modérateur

    Avatar de MaitrePylos
    Homme Profil pro
    DBA
    Inscrit en
    Juin 2005
    Messages
    5 497
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : Belgique

    Informations professionnelles :
    Activité : DBA
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2005
    Messages : 5 497
    Points : 12 600
    Points
    12 600
    Par défaut Newbie création de table
    bonjour, jai un erreur dans le code suivant

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    CREATE TABLE Formation (
      idFormation Serial  NOT NULL,
      Participants_idParticipants INT  NOT NULL,
      ForEnCoursTermine VARCHAR NULL,
      ForDiscipline VARCHAR NULL,
      ForDureeFormation VARCHAR NULL,
      ForAnneeFormation DATE NULL,
      ForOrganisme VARCHAR NULL,
      ForVille VARCHAR NULL,
      PRIMARY KEY(idFormation, Participants_idParticipants),
      INDEX Formation_FKIndex1(Participants_idParticipants),
      FOREIGN KEY(Participants_idParticipants)
        REFERENCES Participants(idParticipants)
    l'erreur est la suivante
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ERROR:  syntax error at or near "(" at character 379
    Pouvez-vous m'aider merci

    MaitrePylos

  2. #2
    Nouveau membre du Club
    Profil pro
    Géomaticien
    Inscrit en
    Mars 2005
    Messages
    35
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Géomaticien
    Secteur : Service public

    Informations forums :
    Inscription : Mars 2005
    Messages : 35
    Points : 26
    Points
    26
    Par défaut
    Désolé si je dis une bétise mais il ne manquerai pas la parenthèse de fin justement ) tout à la fin du create table

  3. #3
    Membre averti
    Homme Profil pro
    Consultant ERP
    Inscrit en
    Septembre 2003
    Messages
    302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Consultant ERP
    Secteur : Distribution

    Informations forums :
    Inscription : Septembre 2003
    Messages : 302
    Points : 331
    Points
    331
    Par défaut
    tu ne dis pas de betises, c bien ça

  4. #4
    Modérateur

    Avatar de MaitrePylos
    Homme Profil pro
    DBA
    Inscrit en
    Juin 2005
    Messages
    5 497
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : Belgique

    Informations professionnelles :
    Activité : DBA
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2005
    Messages : 5 497
    Points : 12 600
    Points
    12 600
    Par défaut
    merci, mais dans le cas présent


    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
    Erreur SQL :
     
    ERROR:  syntax error at or near "(" at character 358
     
    In statement:
     
    CREATE TABLE photogramme (
        idphotogramme serial NOT Null,
        Participants_idParticipants INTEGER NOT Null,
        age int,
        sexe character varying,
        item1 text,
        item2 text,
        item3 text,
        item4 text,
        item5 text,
        item6 text,
        rect1 text,
        rect2 text,
        rect3 text,
        rect4 text,
        credate date
    PRIMARY KEY(idphotogramme, Participants_idParticipants),
      INDEX photogramme_FKIndex1(Participants_idParticipants),
      FOREIGN KEY(Participants_idParticipants)
        REFERENCES Participants(idParticipants)
    );

  5. #5
    Membre averti
    Homme Profil pro
    Consultant ERP
    Inscrit en
    Septembre 2003
    Messages
    302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Consultant ERP
    Secteur : Distribution

    Informations forums :
    Inscription : Septembre 2003
    Messages : 302
    Points : 331
    Points
    331
    Par défaut
    t'as oublié la virgule après date

  6. #6
    Modérateur

    Avatar de MaitrePylos
    Homme Profil pro
    DBA
    Inscrit en
    Juin 2005
    Messages
    5 497
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 51
    Localisation : Belgique

    Informations professionnelles :
    Activité : DBA
    Secteur : Service public

    Informations forums :
    Inscription : Juin 2005
    Messages : 5 497
    Points : 12 600
    Points
    12 600
    Par défaut
    Merci, j'en pleure de honte

  7. #7
    Membre averti
    Homme Profil pro
    Consultant ERP
    Inscrit en
    Septembre 2003
    Messages
    302
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Nord (Nord Pas de Calais)

    Informations professionnelles :
    Activité : Consultant ERP
    Secteur : Distribution

    Informations forums :
    Inscription : Septembre 2003
    Messages : 302
    Points : 331
    Points
    331
    Par défaut
    ça arrive ... même aux meilleurs. Avec l'expérience tu ne feras plus ce genre d'erreur et sache que :

    même le chêne avant d'être grand et fort a été un gland comme toi

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. (VC++6 /C) Pb de création de table Paradox
    Par Vow dans le forum Paradox
    Réponses: 4
    Dernier message: 28/09/2004, 13h15
  2. Problème de création de table sous MySql
    Par ducamba dans le forum Requêtes
    Réponses: 2
    Dernier message: 21/06/2003, 09h59
  3. Création de table avec index
    Par Seb7 dans le forum Requêtes
    Réponses: 2
    Dernier message: 10/04/2003, 16h11
  4. Création multiple table paradox dans le code
    Par scarabee dans le forum C++Builder
    Réponses: 8
    Dernier message: 30/10/2002, 10h17
  5. Newbie......compilateur et table de caractères
    Par Cyberf dans le forum Autres éditeurs
    Réponses: 1
    Dernier message: 21/08/2002, 14h29

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