Erreur SQL

Installation, utilisation, paramétrage de SMI sous Windows
Répondre
gentilnormand
Nouveau membre
Messages : 4
Enregistré le : jeu. janv. 21, 2016 7:28 pm

Erreur SQL

Message par gentilnormand »

Bonjour/bonsoir à toutes et à tous.

Je suis actuellement en train de tenter de mettre en place SMI pour test.
Ma configuration est la suivante : Windows 7 64bits, Wamp 2.5. L'installation de Wamp s'est bien déroulé, ensuite sur PHPMyAdmin j'ai créer une base puis un utilisateur avec les droits qui sont indiqués dans la notice d'installation.

Quand j’exécute le fichier sql smi_1.0.3.sql j'obtiens l'erreur suivante :

Requête SQL :

--
-- Contenu de la table `smi_co`
--


-- --------------------------------------------------------

--
-- Structure de la table `smi_cocl`
--

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 NUL[...]

MySQL a répondu: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=0' at line 58


Quelqu'un peut-il m'éclairer sur cette erreur SVP ?

Merci d'avance,

Cordialement,

Galawa
Site Admin
Messages : 1362
Enregistré le : jeu. févr. 22, 2007 11:26 am
Contact :

Re: Erreur SQL

Message par Galawa »

Bonsoir,

Pouvez-vous me donner le contenu du bloc

--
-- Structure de la table `smi_cocl`
--

Jusqu'à la structure suivante ?

Merci.

Galawa
Gestionnaire du projet SMI

gentilnormand
Nouveau membre
Messages : 4
Enregistré le : jeu. janv. 21, 2016 7:28 pm

Re: Erreur SQL

Message par gentilnormand »

Re,

Merci pour votre rapidité.
Je vous remets le code mais je n'ai rien d'autres de ce que j'ai indiqué dans le premier post :

-- Structure de la table `smi_cocl`
--

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 NUL[...]

Galawa
Site Admin
Messages : 1362
Enregistré le : jeu. févr. 22, 2007 11:26 am
Contact :

Re: Erreur SQL

Message par Galawa »

Bonjour

Je me suis mal exprimé : Il me faut le code de cette section, tiré du fichier SQL

Merci.

Galawa
Gestionnaire du projet SMI

gentilnormand
Nouveau membre
Messages : 4
Enregistré le : jeu. janv. 21, 2016 7:28 pm

Re: Erreur SQL

Message par gentilnormand »

Bonjour,

Voici le contenu de la stucture du fichier SQL. Pour infos c'est le fichier SQL SMI_1.0.3.sql :

-- --------------------------------------------------------

--
-- Structure de la table `smi_cocl`
--

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 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 'TVA196',
`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`),
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=0;

Galawa
Site Admin
Messages : 1362
Enregistré le : jeu. févr. 22, 2007 11:26 am
Contact :

Re: Erreur SQL

Message par Galawa »

Bonjour,

Il faut corriger :

Code : Tout sélectionner

KEY `cocl_codeadev` (`cocl_codeadev`),
en :

Code : Tout sélectionner

KEY `cocl_codeadev` (`cocl_codeadev`)
Bonne journée

Galawa
Gestionnaire du projet SMI

Répondre