-----Original Message-----
From: Rudolf Bekker 
Sent: Monday, 14 July 2003 14:13
To: MySQL MailList ([EMAIL PROTECTED])
Subject: Pulling large Microsoft SQL files into MySQL
Importance: High


The MySQL manual mentions that one could specify the column and value separators and 
the end of file marker explicitly in the LOAD DATA statement.
 
I'm looking for the syntax of this statement to import large data files (.txt) 
originally exported from Microsoft SQL 7.
 
 
Example file:.
 
"Extract_Date"|"LAU"|"Customer_Number"|"BAN_Number"|"Telephone_Number"|"Bill_Date"|"Local_Usage_Credit_Amount"|"Local_Usage_Credit_Call_Count"|"Local_Usage_Credit_Call_Seconds"|"National_Usage_Credit_Amount"|"National_Usage_Credit_Call_Count"|"National_Usage_Credit_Call_Seconds"|"International_Usage_Credit_Amount"|"International_Usage_Credit_Call_Count"|"International_Usage_Credit_Call_Seconds"|"Cell_Usage_Credit_Amount"|"Cell_Usage_Credit_Call_Count"|"Cell_Usage_Credit_Call_Seconds"|"Other_Usage_Credit_Amount"|"Other_Usage_Credit_Call_Count"|"Other_Usage_Credit_Call_Seconds"
"20030409"|"63"|"63000233"|"630002330001"|"--"|"200211"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"-555.94"|"0"|"0"
"20030409"|"63"|"63000233"|"630002330001"|"--"|"200302"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"-594.24"|"0"|"0"
"20030409"|"63"|"63000233"|"630002330001"|"--"|"200303"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"-615.21"|"0"|"0"
"20030409"|"63"|"63000235"|"630002350001"|"0539480616"|"200201"|"-10.53"|"-14"|"-2346"|"-4.89"|"-6"|"-534"|"-1.3"|"-1"|"-26"|"-14.82"|"-4"|"-570"|"0"|"0"|"0"
"20030409"|"63"|"63000283"|"630002830001"|"0539480627"|"200111"|"-6.14"|"-1"|"-7804"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"
"20030409"|"63"|"63000283"|"630002830001"|"0539480627"|"200201"|"-140.79"|"-143"|"-101519"|"-68.16"|"-43"|"-9723"|"0"|"0"|"0"|"-5.68"|"-4"|"-240"|"0"|"0"|"0"
"20030409"|"63"|"63000421"|"630004210001"|"05393621802"|"200303"|"0"|"0"|"0"|"-128.27"|"-22"|"-4680"|"0"|"0"|"0"|"-39.65"|"-6"|"-840"|"0"|"0"|"0"
"20030409"|"63"|"63000459"|"630004590001"|"0539481533"|"200302"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"-.01"|"0"|"0"|"0"|"0"|"0"
"20030409"|"63"|"63000495"|"630004950001"|"0539490419"|"200302"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"-.02"|"0"|"0"|"0"|"0"|"0"
"20030409"|"63"|"63000519"|"630005190001"|"0539490719"|"200302"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"0"|"-.01"|"0"|"0"|"0"|"0"|"0"
"20030409"|"63"|"63000521"|"630005210001"|"0539823312"|"200111"|"0"|"0"|"0"|"-12.29"|"-5"|"-2100"|"-13.5"|"-1"|"-180"|"-264.15"|"-63"|"-17340"|"-34.15"|"-19"|"-6360"
 
I need to specify the text separator as " " and the column separator as |.
 
 
 
Thanx,
 
Rudolf.
 

Reply via email to