473,545 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tab delimited text file into mysql

Hi, I have this problem:
I wish to put a text file into a mysql table.
The text file entries are delimitated by tabs.

123 456 7 89
(That is, '123' is a data, '456' is a data but also '7 89' is a single data).

What command should I use?
I wish to use LOAD DATA INFILE but in wich way?
Something like

LOAD DATA INFILE "myfile.dat " into table01(a, b, c);

would be enought or I'll have only '7' and not '7 89'in row c?

Thank you Alessandra
Jul 20 '05 #1
2 2607
"Sandra" <al************ ****@virgilio.i t> wrote in message
123 456 7 89
(That is, '123' is a data, '456' is a data but also '7 89' is a single data).
LOAD DATA INFILE "myfile.dat " into table01(a, b, c);

would be enought or I'll have only '7' and not '7 89'in row c?

Yes, the default field delimiter is tab, so you have only 3 fields in the
Jul 20 '05 #2
"Sandra" <al************ ****@virgilio.i t> wrote in message
123 456 7 89
(That is, '123' is a data, '456' is a data but also '7 89' is a single data).
LOAD DATA INFILE "myfile.dat " into table01(a, b, c);

would be enought or I'll have only '7' and not '7 89'in row c?

Yes, the default field delimiter is tab, so you have only 3 fields in the
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: JStrummer | last post by:
Any recommendations on how to generate an INSERT SQL script for the records in a tab-delimietd text file? The limitation is that, while I do have command-line mySQL access locally, I do not at my remote host, so I will need to come up with a solution that I can run via something like phpmyadmin, mysqlcc, or TOAD for mySQL. Any help would be...
by: joealey2003 | last post by:
Hi all... I would like to know if SQL SERVER can load a tab delimited text file. If yes, how? A search on the web did not return me the "load data" command as mysql or other.
by: Ben | last post by:
Hi all - I am having a bit of trouble and thought maybe someone in this group could shed some light. Here's the skinny... I am creating an automated process to import a bunch of text files into Access. I want to avoid creating a separate "Spec" for each file (there are over 180 files) and instead want to code my own dynamic importing...
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
by: The Bear | last post by:
I have populated a dataset with a tab delimited text file. When the changes are made in the dataset, I then want to write those changes from the dataset to a tab delimited text file. How do I write each record to that text file. If anyone one knows I would really appreciate the help TB
by: Masa Ito | last post by:
I have pipe delimited (and comma/tab) files that I read with JET using a schema file. Occasionally a field has multiple quotes (") inside a single field - which chokes the line (the rest of the columns get read as nulls). An example of an offending line is: J" Invalid " .... This is a text field that is between the two 'pipes' so I need it...
by: =?Utf-8?B?UmljaA==?= | last post by:
'--this code works but only reads text into one column when contains multiple cols Dim ds1x As New DataSet Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dir1A\;Extended Properties=""Text;HDR=No;FMT=Delimited\""" Dim conn1x As New OleDb.OleDbConnection(ConStr) Dim dax1 As New OleDbDataAdapter("Select * from...
by: s4ndr0ck | last post by:
Alrights....the delimited text in the topic is like this : I would like to get the string with % in the line start with CPU(s) (shown Bold) and put them into a variables.. Would someone be kind enough to write a php file which will do that? Because i know nothing about this parsing things, and just a very little knowledge about php....
by: lancewassing | last post by:
I'm hoping this question is simple. I am trying to create a login script for my already in place client manage using php. I have created a text file filled with usernames and passwords delimited by the "/" character. The file looks like this: lance/wassi norm /wassi amand/yandt aaron/willi miche/young i have an html form which uses...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.