Précédent   Forum des professionnels en informatique > Bases de données > PostgreSQL
PostgreSQL Forum PostgreSQL. Avant de poster -> F.A.Q PostGreSQL Tutoriels PostGreSQL
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 11/07/2005, 12h14   #1
Rédacteur/Modérateur
 
Avatar de MaitrePylos
 
Homme Gérard Ernaelsten
DBA & Dev PHP
Inscription : juin 2005
Messages : 3 182
Détails du profil
Informations personnelles :
Nom : Homme Gérard Ernaelsten
Âge : 39
Localisation : Belgique

Informations professionnelles :
Activité : DBA & Dev PHP
Secteur : Service public

Informations forums :
Inscription : juin 2005
Messages : 3 182
Points : 6 469
Points : 6 469
Par défaut Newbie création de table

bonjour, jai un erreur dans le code suivant

Code :
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 :
ERROR:  syntax error at OR near "(" at character 379
Pouvez-vous m'aider merci

MaitrePylos
MaitrePylos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/07/2005, 12h53   #2
Candidat au titre de Membre du Club
 
Ludovic
Géomaticien
Inscription : mars 2005
Messages : 31
Détails du profil
Informations personnelles :
Nom : Ludovic

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

Informations forums :
Inscription : mars 2005
Messages : 31
Points : 12
Points : 12
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
LudoSIGMA est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/07/2005, 13h34   #3
Membre confirmé
 
Inscription : septembre 2003
Messages : 302
Détails du profil
Informations personnelles :
Âge : 31

Informations forums :
Inscription : septembre 2003
Messages : 302
Points : 251
Points : 251
tu ne dis pas de betises, c bien ça
papy_tergnier est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/07/2005, 14h09   #4
Rédacteur/Modérateur
 
Avatar de MaitrePylos
 
Homme Gérard Ernaelsten
DBA & Dev PHP
Inscription : juin 2005
Messages : 3 182
Détails du profil
Informations personnelles :
Nom : Homme Gérard Ernaelsten
Âge : 39
Localisation : Belgique

Informations professionnelles :
Activité : DBA & Dev PHP
Secteur : Service public

Informations forums :
Inscription : juin 2005
Messages : 3 182
Points : 6 469
Points : 6 469
merci, mais dans le cas présent


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
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)
);
MaitrePylos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/07/2005, 17h26   #5
Membre confirmé
 
Inscription : septembre 2003
Messages : 302
Détails du profil
Informations personnelles :
Âge : 31

Informations forums :
Inscription : septembre 2003
Messages : 302
Points : 251
Points : 251
t'as oublié la virgule après date
papy_tergnier est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/07/2005, 10h35   #6
Rédacteur/Modérateur
 
Avatar de MaitrePylos
 
Homme Gérard Ernaelsten
DBA & Dev PHP
Inscription : juin 2005
Messages : 3 182
Détails du profil
Informations personnelles :
Nom : Homme Gérard Ernaelsten
Âge : 39
Localisation : Belgique

Informations professionnelles :
Activité : DBA & Dev PHP
Secteur : Service public

Informations forums :
Inscription : juin 2005
Messages : 3 182
Points : 6 469
Points : 6 469
Merci, j'en pleure de honte
MaitrePylos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/07/2005, 11h02   #7
Membre confirmé
 
Inscription : septembre 2003
Messages : 302
Détails du profil
Informations personnelles :
Âge : 31

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

Citation:
même le chêne avant d'être grand et fort a été un gland comme toi
papy_tergnier 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 05h19.


 
 
 
 
Partenaires

Hébergement Web