Armin,

1)When you say that the records are duplicate, do you mean the record number(first 
field) or or do you mean the entire record is a duplicate?

2)Now to load a file made out of comma separated fields into a table that  was created 
in the same  field
format, here are 2 ways:
  a)mysql> USE db1;
     mysql> LOAD DATA INFILE "data.txt" INTO TABLE db2.my_table;

   b)C:\ mysql databasename < filename
      (You just got to make sure that the beginning of the file has the insert 
statement in it )

GOdd Luck,

Nestor :-)

-----Original Message-----
From: Armin <[EMAIL PROTECTED]>
Sent: Jan 9, 2004 6:16 PM
To: [EMAIL PROTECTED]
Subject: import data from text files

hi list , 

I've got two problem with mysql , maybe it is not a real 'problem' but i need 
help hardly ! :)

1 > in a table , we got many record ( 1400 ) , some of them are equal , i want 
to delete just one of them , in other word , i don't want two record equal . 

2 > i got a text file , which must be into a table , text file syntax is 
' a,b,c ' and in table we got ' id,user,pass ' , how can i load data from text 
into right place on table ? 

for example i got this in text file ( text file is
 long , 4200 line ) : 
1,zoup,mypass 
which must be in table as 
id|user|password
1  zoup  mypass 

it is radcheck table (radius) ,
thanks in advanced :) 

-- 
If you put garbage in a computer nothing comes out but garbage.  But
this garbage, having passed through a very expensive machine, is
somehow enabled and none dare criticize it.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to