If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > problem in load to MySQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-11-08, 04:19
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile problem in load to MySQL

HI,

When want to export table in csv and load in MySQL i m using

EXPORT TO C:\KFPSMIG\latestlivekfpsdata\livecsvkfps\KFPSCND. csv OF CSV MODIFIED BY chardel"" coldel, decpt. datesiso decplusblank MESSAGES C:\KFPSMIG\latestlivekfpsdata\livecsvkfps\KFPSCND. txt select * from KFPSCND ;

to export

and

LOAD DATA LOCAL INFILE 'KFPSCND.csv' INTO TABLE kfps.KFPSCND FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\'

to Load in MySQL

but while i am Loading in Mysql many records are skipping in MySQL whats could be the problem please help
Reply With Quote
  #2 (permalink)  
Old 08-11-08, 05:15
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
are we allowed to see any of the rows which are failing to load
and or the column defintions
and or any error messages

have you tried loading a small amount of records using say the query browser, or some other tools such as PHPMyAdmin
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 08-11-08, 08:36
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile

Quote:
Originally Posted by healdem
are we allowed to see any of the rows which are failing to load
and or the column defintions
and or any error messages

have you tried loading a small amount of records using say the query browser, or some other tools such as PHPMyAdmin
Operating system is Windows XP

when i use fields terminated by '\t' all the rows insert but when not null values shown for varchar and same as for bigint

when i use fields terminated by ',' rows are skipped as (2,4,6,....)no rows for (1,3,5) dont know how
Reply With Quote
  #4 (permalink)  
Old 08-11-08, 11:49
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
so what is different between the the odd and even numbered rows
have you allowed for null values in the db
operating system may be a problme if you are mixing your capitalisations.. XP can reject or accept different capitalisation.. *NIX boxes will always reject different CaPiTalisations

as its a CSV I'd suggest delinitiating columns with a comma unless your data stream includes commas.

ive alwasy encapsulated text columns in a character (usually)

date times often trip up imports


still it would be nice to know what data you are importing,
what the table definition is
and what the MySQL error message(s) is/are
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #5 (permalink)  
Old 08-11-08, 13:49
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by healdem
I'd suggest delinitiating columns with a comma
um, WTF??? delinitiating ?????????
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #6 (permalink)  
Old 08-11-08, 14:55
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,606
Quote:
Originally Posted by r937
um, WTF??? delinitiating ?????????
Picky, picky, picky...

Just because he couldn't spell delimitatatizing.

-PatP
Reply With Quote
  #7 (permalink)  
Old 08-11-08, 16:12
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
seemed fair enough to me

delineated: represented accurately or precisely

ok it was badly spellt, but as any fule no I can't, don't, seem unable to spell check or proof read
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #8 (permalink)  
Old 08-12-08, 04:57
ankur02018 ankur02018 is offline
Registered User
 
Join Date: Jun 2007
Posts: 189
Smile

Quote:
Originally Posted by ankur02018
HI,


LOAD DATA LOCAL INFILE 'KFPSCND.csv' INTO TABLE kfps.KFPSCND FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\'

to Load in MySQL
Please tell how to load in mysql so that blank cell in csv replaces to null in table in which we are loading
Reply With Quote
  #9 (permalink)  
Old 08-12-08, 05:06
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
without seeing your data or your table defintions its hard to say
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On