Jump to content
Forum Roportal
Sign in to follow this  
Andreyy16

probleme la importarea in baza de date

Rate this topic

Recommended Posts

Buna seara vreau sa importez si eu in baza de date un fisier SQL care mi-l trebuie la un torrent fisieru are acest continut

 

-- MySQL dump 9.10

--

-- Host: localhost Database: bittorrent

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

-- Server version 4.0.18-log

 

--

-- Dumping data for table ``countries

--

 

INSERT INTO countries VALUES (1,'Sweden','sweden.gif');

INSERT INTO countries VALUES (2,'United States of America','usa.gif');

INSERT INTO countries VALUES (3,'Russia','russia.gif');

INSERT INTO countries VALUES (4,'Finland','finland.gif');

INSERT INTO countries VALUES (5,'Canada','canada.gif');

INSERT INTO countries VALUES (6,'France','france.gif');

INSERT INTO countries VALUES (7,'Germany','germany.gif');

INSERT INTO countries VALUES (8,'China','china.gif');

INSERT INTO countries VALUES (9,'Italy','italy.gif');

INSERT INTO countries VALUES (10,'Denmark','denmark.gif');

INSERT INTO countries VALUES (11,'Norway','norway.gif');

INSERT INTO countries VALUES (12,'United Kingdom','uk.gif');

INSERT INTO countries VALUES (13,'Ireland','ireland.gif');

INSERT INTO countries VALUES (14,'Poland','poland.gif');

INSERT INTO countries VALUES (15,'Netherlands','netherlands.gif');

INSERT INTO countries VALUES (16,'Belgium','belgium.gif');

INSERT INTO countries VALUES (17,'Japan','japan.gif');

INSERT INTO countries VALUES (18,'Brazil','brazil.gif');

INSERT INTO countries VALUES (19,'Argentina','argentina.gif');

INSERT INTO countries VALUES (20,'Australia','australia.gif');

INSERT INTO countries VALUES (21,'New Zealand','newzealand.gif');

INSERT INTO countries VALUES (23,'Spain','spain.gif');

INSERT INTO countries VALUES (24,'Portugal','portugal.gif');

INSERT INTO countries VALUES (25,'Mexico','mexico.gif');

INSERT INTO countries VALUES (26,'Singapore','singapore.gif');

INSERT INTO countries VALUES (70,'India','india.gif');

INSERT INTO countries VALUES (65,'Albania','albania.gif');

INSERT INTO countries VALUES (29,'South Africa','southafrica.gif');

INSERT INTO countries VALUES (30,'South Korea','southkorea.gif');

INSERT INTO countries VALUES (31,'Jamaica','jamaica.gif');

INSERT INTO countries VALUES (32,'Luxembourg','luxembourg.gif');

INSERT INTO countries VALUES (33,'Hong Kong','hongkong.gif');

INSERT INTO countries VALUES (34,'Belize','belize.gif');

INSERT INTO countries VALUES (35,'Algeria','algeria.gif');

INSERT INTO countries VALUES (36,'Angola','angola.gif');

INSERT INTO countries VALUES (37,'Austria','austria.gif');

INSERT INTO countries VALUES (38,'Yugoslavia','yugoslavia.gif');

INSERT INTO countries VALUES (39,'Western Samoa','westernsamoa.gif');

INSERT INTO countries VALUES (40,'Malaysia','malaysia.gif');

INSERT INTO countries VALUES (41,'Dominican Republic','dominicanrep.gif');

INSERT INTO countries VALUES (42,'Greece','greece.gif');

INSERT INTO countries VALUES (43,'Guatemala','guatemala.gif');

INSERT INTO countries VALUES (44,'Israel','israel.gif');

INSERT INTO countries VALUES (45,'Pakistan','pakistan.gif');

INSERT INTO countries VALUES (46,'Czech Republic','czechrep.gif');

INSERT INTO countries VALUES (47,'Serbia','serbia.gif');

INSERT INTO countries VALUES (48,'Seychelles','seychelles.gif');

INSERT INTO countries VALUES (49,'Taiwan','taiwan.gif');

INSERT INTO countries VALUES (50,'Puerto Rico','puertorico.gif');

INSERT INTO countries VALUES (51,'Chile','chile.gif');

INSERT INTO countries VALUES (52,'Cuba','cuba.gif');

INSERT INTO countries VALUES (53,'Congo','congo.gif');

INSERT INTO countries VALUES (54,'Afghanistan','afghanistan.gif');

INSERT INTO countries VALUES (55,'Turkey','turkey.gif');

INSERT INTO countries VALUES (56,'Uzbekistan','uzbekistan.gif');

INSERT INTO countries VALUES (57,'Switzerland','switzerland.gif');

INSERT INTO countries VALUES (58,'Kiribati','kiribati.gif');

INSERT INTO countries VALUES (59,'Philippines','philippines.gif');

INSERT INTO countries VALUES (60,'Burkina Faso','burkinafaso.gif');

INSERT INTO countries VALUES (61,'Nigeria','nigeria.gif');

INSERT INTO countries VALUES (62,'Iceland','iceland.gif');

INSERT INTO countries VALUES (63,'Nauru','nauru.gif');

INSERT INTO countries VALUES (64,'Slovenia','slovenia.gif');

INSERT INTO countries VALUES (66,'Turkmenistan','turkmenistan.gif');

INSERT INTO countries VALUES (67,'Bosnia Herzegovina','bosniaherzegovina.gif');

INSERT INTO countries VALUES (68,'Andorra','andorra.gif');

INSERT INTO countries VALUES (69,'Lithuania','lithuania.gif');

INSERT INTO countries VALUES (70,'Macedonia','macedonia.gif');

INSERT INTO countries VALUES (71,'Netherlands Antilles','nethantilles.gif');

INSERT INTO countries VALUES (72,'Ukraine','ukraine.gif');

INSERT INTO countries VALUES (73,'Venezuela','venezuela.gif');

INSERT INTO countries VALUES (74,'Hungary','hungary.gif');

INSERT INTO countries VALUES (75,'Romania','romania.gif');

INSERT INTO countries VALUES (76,'Vanuatu','vanuatu.gif');

INSERT INTO countries VALUES (77,'Vietnam','vietnam.gif');

INSERT INTO countries VALUES (78,'Trinidad & Tobago','trinidadandtobago.gif');

INSERT INTO countries VALUES (79,'Honduras','honduras.gif');

INSERT INTO countries VALUES (80,'Kyrgyzstan','kyrgyzstan.gif');

INSERT INTO countries VALUES (81,'Ecuador','ecuador.gif');

INSERT INTO countries VALUES (82,'Bahamas','bahamas.gif');

INSERT INTO countries VALUES (83,'Peru','peru.gif');

INSERT INTO countries VALUES (84,'Cambodia','cambodia.gif');

INSERT INTO countries VALUES (85,'Barbados','barbados.gif');

INSERT INTO countries VALUES (86,'Bangladesh','bangladesh.gif');

INSERT INTO countries VALUES (87,'Laos','laos.gif');

INSERT INTO countries VALUES (88,'Uruguay','uruguay.gif');

INSERT INTO countries VALUES (89,'Antigua Barbuda','antiguabarbuda.gif');

INSERT INTO countries VALUES (90,'Paraguay','paraguay.gif');

INSERT INTO countries VALUES (93,'Thailand','thailand.gif');

INSERT INTO countries VALUES (92,'Union of Soviet Socialist Republics','ussr.gif');

INSERT INTO countries VALUES (94,'Senegal','senegal.gif');

INSERT INTO countries VALUES (95,'Togo','togo.gif');

INSERT INTO countries VALUES (96,'North Korea','northkorea.gif');

INSERT INTO countries VALUES (97,'Croatia','croatia.gif');

INSERT INTO countries VALUES (98,'Estonia','estonia.gif');

INSERT INTO countries VALUES (99,'Colombia','colombia.gif');

INSERT INTO countries VALUES (100,'Lebanon','lebanon.gif');

INSERT INTO countries VALUES (101,'Latvia','latvia.gif');

INSERT INTO countries VALUES (102,'Costa Rica','costarica.gif');

INSERT INTO countries VALUES (103,'Egypt','egypt.gif');

INSERT INTO countries VALUES (104,'Bulgaria','bulgaria.gif');

INSERT INTO countries VALUES (105,'Isla de Muerte','jollyroger.gif');

Dar cand vreau sa il import in baza de date imi da aceasta erroare

Eroare

Comanda SQL:

 

-- MySQL dump 9.10

--

-- Host: localhost Database: bittorrent

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

-- Server version 4.0.18-log

--

-- Dumping data for table ``countries

--

INSERT INTO countries

VALUES ( 1, 'Sweden', 'sweden.gif' ) ;

 

 

MySQL zice:

 

#1062 - Duplicate entry '1' for key 'PRIMARY'

 

Oare ce trebuie sa fac la el? multumesc pentru intelegere

Share this post


Link to post
Share on other sites

Probabil incerci sa-l importi a doua oara? Iti sugerez sa modifici dump-ul, inainte de primul insert adauga:

 

DELETE FROM countries;

 

si apoi il importi din nou:

 

mysql bittorrent < dump.sql

Share this post


Link to post
Share on other sites
Probabil incerci sa-l importi a doua oara? Iti sugerez sa modifici dump-ul, inainte de primul insert adauga:

 

DELETE FROM countries;

 

si apoi il importi din nou:

 

mysql bittorrent < dump.sql

Asa e l-am bagat o data mi-a dat erroare dar la introdus si nu am stiut am rezolvat multumesc mult

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×