List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:August 3 1999 3:13pm
Subject:Re: newbi
View as plain text  
Jan Jozwiak wrote:
> 
> Hi
> 
>  I am a newbi at using MySQL. I have a littel company witch is selling
> computer-parts, but I need a database to get it all in order. I tryed for
> a week to get it to run, with out any luck. I have a text file that i want
> to import:
> 
> File:
> "name1","name2",....,"name8"
> "name1","name2",....,"name8"
> ..
> ..
> 
> Can enyone help me get startet
> 
> PS: I use Linux RH60, kernel 2.2.10, MySQL-3.22.25
> 
> Best regard
> Jan Jozwiak, Denmark    jozwiak@stripped | jan@stripped

Hi Jan

1) CREATE DATABASE newDatabase
2) USE newDatabase
3) CREATE TABLE newTable (name1 INT, name2 VARCHAR(100),name3 DOUBLE,... name8 TEXT)
4) 
LOAD DATA INFILE 
	'/path/to/file' 
INTO 
	newTable
FIELDS
	TERMINATED BY
		','
	ENCLOSED BY
		'"'
LINES TERMINATED BY
		'\n'

That's it :)

Tschau
Christian

Thread
newbiJan Jozwiak2 Aug
  • newbisinisa3 Aug
  • Re: newbiChristian Mack3 Aug
Re: newbiPinkeshP3 Aug
  • Re: newbisinisa3 Aug