Erreur d'importation sql

Installation, utilisation, paramétrage de SMI sous Windows

Erreur d'importation sql

Messagepar TAD » Dim Jan 31, 2016 4:54 pm

Bonjour je rencontre une erreur l'iportation du fichier sql
Erreur

Requête SQL :


CREATE TABLE IF NOT EXISTS `smi_cocl` (
`cocl_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cocl_datecrea` date NOT NULL DEFAULT '0000-00-00',
`cocl_codecrea` varchar(20) NOT NULL DEFAULT '',
`cocl_datemod` date NOT NULL DEFAULT '0000-00-00',
`cocl_codemod` varchar(20) NOT NULL DEFAULT '',
`cocl_dateenv` date NOT NULL DEFAULT '0000-00-00',
`cocl_datesig` date NOT NULL DEFAULT '0000-00-00',
`cocl_daterec` date NOT NULL DEFAULT '0000-00-00',
`cocl_code` varchar(20) NOT NULL DEFAULT '',
`cocl_codeco` varchar(10) NOT NULL DEFAULT '',
`cocl_codeper` varchar(10) NOT NULL DEFAULT '',
`cocl_codeage` varchar(10) NOT NULL DEFAULT '',
`cocl_codecli` varchar(20) NOT NULL DEFAULT '',
`cocl_delai` int(2) NOT NULL DEFAULT '0',
`cocl_nbs` int(6) NOT NULL DEFAULT '0',
`cocl_typh` tinyint(1) NOT NULL DEFAULT '0',
`cocl_dated` date NOT NULL DEFAULT '0000-00-00',
`cocl_datef` date NOT NULL DEFAULT '0000-00-00',
`cocl_preavis` tinyint(3) unsigned NO[...]

MySQL a répondu: Documentation
#1072 - Key column 'cocl_codecat' doesn't exist in table
Merci de l'aide
TAD
Membre
 
Messages: 13
Enregistré le: Mar Mars 27, 2012 8:40 am

Re: Erreur d'importation sql

Messagepar Galawa » Jeu Fév 04, 2016 11:33 pm

Bonjour,

Le bon code est :

Code: Tout sélectionner
CREATE TABLE IF NOT EXISTS `smi_cocl` (
  `cocl_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cocl_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `cocl_codecrea` varchar(20) NOT NULL DEFAULT '',
  `cocl_datemod` date NOT NULL DEFAULT '0000-00-00',
  `cocl_codemod` varchar(20) NOT NULL DEFAULT '',
  `cocl_dateenv` date NOT NULL DEFAULT '0000-00-00',
  `cocl_datesig` date NOT NULL DEFAULT '0000-00-00',
  `cocl_daterec` date NOT NULL DEFAULT '0000-00-00',
  `cocl_code` varchar(20) NOT NULL DEFAULT '',
  `cocl_codecat` varchar(10) NOT NULL DEFAULT '-1',
  `cocl_codeco` varchar(10) NOT NULL DEFAULT '',
  `cocl_codeper` varchar(10) NOT NULL DEFAULT '',
  `cocl_codeage` varchar(10) NOT NULL DEFAULT '',
  `cocl_codecli` varchar(20) NOT NULL DEFAULT '',
  `cocl_delai` int(2) NOT NULL DEFAULT '0',
  `cocl_nbs` int(6) NOT NULL DEFAULT '0',
  `cocl_typh` tinyint(1) NOT NULL DEFAULT '0',
  `cocl_dated` date NOT NULL DEFAULT '0000-00-00',
  `cocl_datef` date NOT NULL DEFAULT '0000-00-00',
  `cocl_preavis` tinyint(3) unsigned NOT NULL DEFAULT '60',
  `cocl_daterel` date NOT NULL DEFAULT '0000-00-00',
  `cocl_nivrel` tinyint(1) NOT NULL DEFAULT '0',
  `cocl_renouv` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `cocl_rnum` varchar(20) NOT NULL DEFAULT '',
  `cocl_datefin` date NOT NULL DEFAULT '0000-00-00',
  `cocl_signe` varchar(70) DEFAULT NULL,
  `cocl_soldes` int(10) NOT NULL DEFAULT '0',
  `cocl_matos` text NOT NULL,
  `cocl_pvht` float(10,2) unsigned NOT NULL DEFAULT '0.00',
  `cocl_codeadev` varchar(3) NOT NULL,
  `cocl_coderlp` text,
  `cocl_sitep` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `cocl_codetva` varchar(10) NOT NULL DEFAULT 'TVA20',
  `cocl_nbsnc` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `cocl_renauto` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `cocl_nbsdep` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`cocl_id`),
  KEY `cocl_code` (`cocl_code`),
  KEY `cocl_codecli` (`cocl_codecli`),
  KEY `cocl_codeco` (`cocl_codeco`),
  KEY `cocl_codeper` (`cocl_codeper`),
  KEY `cocl_fini` (`cocl_datefin`),
  KEY `cocl_renouv` (`cocl_renouv`),
  KEY `cocl_rnum` (`cocl_rnum`),
  KEY `cocl_codetva` (`cocl_codetva`),
  KEY `cocl_codeadev` (`cocl_codeadev`),
  KEY `cocl_codecat` (`cocl_codecat`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0;


Merci.

Galawa
Gestionnaire du projet SMI
Galawa
Site Admin
 
Messages: 1362
Enregistré le: Jeu Fév 22, 2007 11:26 am


Retour vers SMI sous Windows

Qui est en ligne

Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 2 invités

cron