Import From Text
I have a text file which contains names and dates. the date is in the format
Sep-11-2001 12:30 AM.
I tried to put the text into Excel and then used Navicat to import from Excel.
But everytime the dates are converted to 1/1/2001.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Text Import
I need to append records from an Excel spreadsheet to an existing table. I think I should start by converted the Excel sheet to a text file then importing from there. I have to do this using myPHPAdmin. Am I on the right path and how do I start and import using myPHPAdmin?
CSV Import When There Are Commas In The Text?
I'm trying to grab a csv file from a remote server and import the data my mySQL DB. I'm using Curl to grab the file contents and php to import the data into my DB. The problem have is that the data in the csv file contains commas in the text field that is interferring with the import and I have no control over what is in the file. eg the csv looks like: id,name,description1,description2,date 1,pete,"this has a comma, in the text", "this also has, a comma", 2004-09-09 etc, etc The additional commas mess up the import. Is there any way I can get this data into mysql and just tell it to ignore any commas in certain fields?
How To Import Text File?
I am using MAMP and am trying to import a large text file (up to 30mb) that is defined by position i.e., space 1-8 = ID, space 9-14 = Description, etc. The only option for import is via SQL or CSV file.
Text File Import
I'm importing a large text file (8 million lines) into a mysql table via the heidisql front end. Each line has 42 fields (tab separated) so there's a lot of data to bring in. I tested the import with a truncated version of the text file (10,000 lines) and the import worked fine. It took about a minute (i think) to import. Now though, the full version (which is 800x as long) has been importing for nearly 48 hours. Heidisql seems to be still working - it hasn't frozen, it's busy. Is it normal for a file of this size to take so long to import?
Import A Text File
I have a utf8 txt file to import in a MySQL db, cause I must create a web-application in PHP for reading this information on-line. I have create a new DB in MYSQL 4.1.1a setting CHARACTER=utf8, then I have create a table t1 with character set utf8 and some fileds also with CHARACTER=utf8. Then I imported the Txt file (really in UTF8 format, with 22600 records!) in my db. MySQL have imported the non-utf8 field correctly, 26000 records. When I try to read this utf8 filed they appear like "???-?-???". Then, also my PHP application show this field with stranges characters. I have try also with PHPfunction utf8_encode with no success
Import Text And Csv File
i want to import either text or csv file to database how can i do this..i have tried mysqlimport command but its giving some error
MySQL Import Text File Too Big?
Our production database in an exported textfil runs about 60 MB. Compressed that's about 9 MB. I'm trying to import the export into another machine running FC3 and mySQL 11.18, and it appears as though the file may be too big! When I try to do it via command line: mysql -u root --host=localhost printing < ./printing.txt It eventually errors out with a "syntax error on line X" and only about half the tables get imported, and MyPHPAdmin GUI interface says it has a 2MB file limit on importing. This concerns me. If something were to happen to our production database, how am I going to restore it? I tried to do a search on mysql.com, but that's a less than helpful site for support. A newsgroup search on the topic didn't come up with much, so maybe I'm just bad at using keywords.
Import A Text Backup Of SQL Db Into Another One On Linux
I have a SQL file, which is a backup of a database (data+scheme). The file was generated using MySQLGUI backup features on a windows 2k3 server. Now I would like to import this data + scheme into a mysql server running on linux, there is no GUI on the machine. 2 questions if I may: 1. How do I import the described above data. 2. Will the meta data (permissions, collation & co.) will be restored as well, or will I need to reconfigure them ?
Data Import From Text File
When I try to import a text file with new data for an existing table I get the error "1148 - the used command is not allowed with this MySQL version." I have tried with both PHPMyAdmin2.3 and with MySQLFront 2.5. Both these GUI programmes have an "import from text file" command which I have used successfully several times to add entries to this table before - running just this MySQL version. I have structured the data in the text file in just the same format as previously. Both these programmes are connecting to the database successfully now and will display the contents of the existing table data and strcutre of the database etc (despite an earlier connection problem which seems to have been solved spontaneously). But both now deliver exactly this error message (and therefore I assume it is MySQL and not the interface programmes which is doing it).I cannot see that I am doing anything different. I have MySQL 4.0.12 on Windows ME PC with a local Apache server and PHP.
Error In Mysql Import (text File)
Error SQL query: -- phpMyAdmin SQL Dump -- version 2.8.0.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: May 27, 2006 at 12:21 AM -- Server version: 4.1.18 -- PHP Version: 4.4.2 -- -- Database: `lopata_trnew` -- -- -------------------------------------------------------- -- -- Table structure for table `Register` -- CREATE TABLE `Register` ( `id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT , `Date` date default NULL , `Name` text, `Company` text, `Address` text, `City` text, `State` tinytext, `Zip` text, `marketarea` text, `Phone` text, `Email` text, `Comments` text, `OwnerNameA1` text, `OwnerNameB1` text, `PropAddr1` text, `PropZip1` text, `OwnerNameA2` text, `OwnerNameB2` text, `PropAddr2` text, `PropZip2` text, `OwnerNameA3` text, `OwnerNameB3` text, `PropAddr3` text, `PropZip3` text, PRIMARY KEY ( `id` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =49; MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' CREATE TABLE `Register` ( `id` int(10) unsigned NOT NULL auto_increm' at line 1
Problem With Data Import From Text File
When I try to import a text file with new data for an existing table I get the error "1148 - the used command is not allowed with this MySQL version." I have tried with both PHPMyAdmin2.3 and with MySQLFront 2.5. Both these GUI programmes have an "import from text file" command which I have used successfully several times to add entries to this table before - running just this MySQL version. I have structured the data in the text file in just the same format as previously. Both these programmes are connecting to the database successfully now and will display the contents of the existing table data and strcutre of the database etc (despite an earlier connection problem which seems to have been solved spontaneously). But both now deliver exactly this error message (and therefore I assume it is MySQL and not the interface programmes which is doing it). I cannot see that I am doing anything different. I have MySQL 4.0.12 on Windows ME PC with a local Apache server and PHP. PS I sent a long message about this and a connection problem yesterday which was not succint enough.
Import Structured Text File Into Mysql
I've a lot of structured files like the following one I would like to import in a mysql database: Message-ID: <417ee59f@mail-ha1> Subject: test From: renu [renu@solicomm.net] Newsgroups: Practice <html> <head> </head> <body> <p> xghdgdfgfgdff </p> <p> xgdsfssdfsdf fsdfsfsdfhdgdfgfgdff </p> </body> </html> I need to import the first 4 rows in 4 columns (messageid, subject, form, newsgroups) and the last part of the text, which is in html, in a 5th colum. The fact is that I'm not sure whether it's possible. Should it be possible, could someone point me to the method/tool that could help me in doing that?
Trying To Import A Text File That Has A Non-standard Encoding
I have written a applicaiton that reads in a text file and then parses each line to store a record in MySQL. I'm having problem with only this one file where when I open with notepad, there is no new line and instead the line breaker character is replaced with a number like 105788, 105704, 105708, and so on (its not the same number for each line) However, when I open this same file with wordpad, the new line shows correctly. I was wondering if anyone can point out some suggestion as to how I can effectively import this file. Currently, my application is dependent on the fact that each field is seperated by a new line.
Import Data From Text File Mysql
Im going to write a script in linux that updates my mysql database. How can i write a sql statemtn that updates my mysql table from a text file located on my machine? lil confused bout the path of the txt file?
Import Fixed Lenght Field From Ascii Text
does anyone have some suggestion to import Asccii text into Mysql tables The tables are empty and can be created at import The records from ascii text are fixed lenght but delimited by CRLF The fields are not delimited but fixed lenght
Import A Directory Of Text Files Into A Mysql Database With Php?
I have a directory of text files that i'd like to import into a msql table... I was wondering if there's an easier way to do this with php/mysql, I'd like to avoid copy/pasting the entire directory (thousands of files) into the database if i can. The directory structure of the text files resembles... somepath/A/Aerosmith/Song Name.txt - (extention varies) What i'd like to do is use php to scan the directory and input the file path information and the content from each file into a table like... Dir Artist Song Text Type ------------------------------------------------------------------------ A Aerosmith Song Name Fa La La La La (example text) File Ext B Beatles Song Name Fa La La La La (example text) File Ext
Schedule Auto Import New Log / Text Files Into MySQL
Basically we have a SQL Server Database on our telecoms switch, to which under the maintenance contract we have no direct access. Every 15 mins log files are downloaded in *.log files (text files) which contain data we can upload to our own databases for querying. The log files are on an ftp server and the filenames comprise of date and time of dumps. Requirement : In short I would like to know the best way to automatically update tables on a MySQL database with the new log files as they appear or if there is some existing software which allows this type of schedule and auto import. I would be very greatful if someone can give me some ideas with this problem as it would save me so much time and I am most familiar with mySql and Sql Server databases and would appreciate help in either database.
LOAD DATA INFILE Command To Import A Text File
I am using the LOAD DATA INFILE command to import a text file into mysql. However, there is much more text in the file than needed in my tables. How can I make a selection from the text line. For example position 5 - 10 in field A, position 20-23 in field B, etc ...
Exporting Blob / Text Column With Hyphen Delimited Text
I have a table that contains a column (blob, text type, formatted as MEDIUMTEXT) with text hyphen (-) delimited, listing rooms by numbers, and I need to export or insert that data into another table, where all other info on the other columns remains the same, but I need the data on the blob field to be single listed another words, i have a table like this (example): School Rooms Your Hometown High School 1034-1035-1037-1039 My Hometown High School 208-178-1432-1728 I need it like this: School Rooms Your Hometown High School 1034 Your Hometown High School 1035 Your Hometown High School 1037 Your Hometown High School 1039 My Hometown High School 208 My Hometown High School 178 My Hometown High School 1432 My Hometown High School 1728
Automatically Generate Text Excerpt For Text Near Keyword Hits?
I would like to generate an automatic text excerpt showing the text close to the first occurance of a keyword needle in a text haystack. For example: searching for keyword = "foo" in a table called Webpages in the column Content = "Yadda, yadda, yadda. Bla, bla, bla foo yadda yadda yaddda bla bla bla" would return a column called Excerpt = "...a, bla foo yadda yadd..." Is this best done with PHP after fetching the entire column Content, or will it be more efficient to do directly with MySQL? What would that SQL query look like?
Exporting Blob / Text Column With Hyphen Delimited Text
I have a table that contains a column (blob, text type, formatted as MEDIUMTEXT) with text hyphen (-) delimited, listing rooms by numbers, and I need to export or insert that data into another table, where all other info on the other columns remains the same, but I need the data on the blob field to be single listed another words, i have a table like this (example): Code:
Help: Replacing Same Text With New Text In Hundred Rows
I have about a couple hundred email addresses in a table... every email address includes @domain.com (the same domain). However, that domain is changing to a new domain... and I need to replace only the @domain.com to @newdomain.com. Any ideas how I do that? Ie.. a table might look like this: ID -- email 1 -- aaron@domain.com 2 -- brian@domain.com 3 -- chase@domain.com needs to change to 1 -- aaron@newdomain.com 2 -- brian@newdomain.com 3 -- chase@newdomain.com
Insert Text File In A Text Field
2 questions: 1) How can I insert a text file into a TEXT field (of a table) by a mysql instruction ?; 2) How can I insert a microsoft word file into a BLOB field (of a table) by a mysql instruction?
Converting Database Text To Html Text
Is there a function in MySQL or PHP that will automatically convert a text with paragraphs etc. to an html ready text. i.e. a function that will add <p> tags etc.
Adding Text To Existing Text
I am trying to add a string of text to the end of text that is already stored in the DB. For example likes = "I like television" is already stored in the DB The user then wants to add "-I like music". So I want the end result to be: likes = "I like television-I like music" I tried: UPDATE table SET likes = likes + "-I like music" but that gives me an error and only works for numbers What is the text equivilent of adding to an existing field?
Full Text Index And Full Text Search On Several Columns And Indivdiual Columns
1. Say if I want to do the full text search on three columns, "title", "description", "keyword". The search could be done only on one column, or combine any two columns, or combine all three columns, do I need to create full text index for all these possiblilities, like full text index on each column, and then full text index on any two columns and then full text index on all three columns? If I have to make so many different kind full text index, that will slow my database performance or not? 2. Will the relevance also be calculated based on which column, such as the "title" will have higher relevance than "keyword", the "keyword" will have higher relevance than "description"?
Import From CSV
Using SQLyog 5.02 into MySQL server 5.0. Have built table structures and am trying to import data from CSV. I get a rather non-descript dialog box saying only "Error while importing data". Does anyone have any suggestions on how to better accomplish this import or how this error could be deciphered?
Import To 5 From 4
I have a site in a remote server that uses MySQL 4.1.10; MySQL charset is utf8 and MySQL connection collation is utf8_general_ci I want to transport all of this tables to a new server that uses MySQL 5.0.45; charset and connection collation is the same. I'm using phpmyadmin. I'm not able to succeed! When the table has 400 registers the error message is: Fatal error: Maximum execution time of 300 seconds exceeded in /opt/lampp/phpmyadmin/libraries/string.lib.php on line 91 When the table has 30 registers the error is: MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 29 What's wrong?
DB Import
I'm having problem importing an existing database to different server. Everytime it giving same error. CREATE TABLE `7stat` ( `usrid` int( 11 ) default NULL , `date` date default NULL , `time` time default '00:00:00', `pg_views` int( 11 ) default '0', `num` float default NULL , `received_pay` char( 3 ) default 'no' ) ENGINE = MYISAM DEFAULT CHARSET = latin1; MySQL said: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 8 Why it is happening? what is the solution. I heard someone that i need spilit the database becoz it is big. But it is only 1.5MB.
CSV Import
I am using Win 2003 Server. MySql version is 14.12, distrib 5.0.27, for Win32. Obviously, I am new to MySql. I've been developing a set of batch file scripts to automatically import CSV data daily. I was using the the following when suddenly it stopped working and said it couldn't find the CSV file. The CSV file does exist and to make sure I had no typos I cut the file name from the temp_import.sql below and entered it in a Windows Explorer address box and Excel popped up and displayed the file. I tried using double-quotes and the back-tick around the file name but that caused a different error. Notice that the error message has removed all of the backslashes from the file name. As I said, I am developing it and may have perhaps mistyped something that I don't notice. It's as if I accidently changed something in the MySQL configuration with one of my commandline switches. I even tried rebooting the server but still the same thing. Code:
Sql Import
Im importing a large amount of data into Mysql using the sql upload import. The first couple of lines of my .sql file read as this INSERT INTO `phpcatalog_alt_price` ( `alt_price_id` , `alt_price_name` , `product_id` , `alt_price_sku` , `alt_price_price` , `alt_price_op` , `alt_price_var1` , `alt_price_var2` , `alt_price_image1` , `alt_price_category` ) VALUES The problem is that the 'product_id' field is going to start having numbers double up. What command can I insert here to tell Mysql to delete any old entries containing the same product_id as the SQL file I'm uploading? I just want to keep the new entries and any old entries containing a duplicate 'product_id' get deleted.
CSV Import
I am having trouble importing a CSV file into mySQL. I've basically narrowed it down to it having trouble reading quotation marks ("). The problem is that one of the columns is a measurement so they must remain in the data somehow. By replacing the " in Excel to another character I was able to successfully import the file. Is there a way to import the file with the quotation marks intact? Or after the datafile is imported into mySQL how would I go about replacing a selected character in a certain column back into a quotation mark(") ?
Sql Import
I have a rather large file that I gzipped and imported into a database (a forum). I configured the forum to access the database and viewed it. It all worked fine except for the fact that it doesn't display umlauts or any other "special" chars, like double-quotes, etc. properly. A ü becomes ü and so on. I un-gzipped the file and checked it with a text-editor and the umlauts and all other chars are fine in the file, displaying correctly. The charset that was used in the sql file was latin1 so I thought I'd switch it to utf8 and re-do the import. Didn't help though.
Max Import
Is there a way to change the size limit for uploading in phpMyAdmin? I have a 40 meg zipcode file that will be a PITA to break apart.
Import
At work we have a huge Excel spreadsheet containing many rows, columns and sheets. It is a compilation of auto parts by our foreign parts buyer over the last four years. Each sheet is a different make (I.E. Audi, BMW, Etc). On each sheet are rows and columns with Mfg part numbers, descriptions, applicable years and our part numbers. The project at hand is to get this data into a MySQL DB and then make it searchable on our Intranet by make, model, year or part number. I am familiar with Web servers, HTML, PHP, PERL, etc and have a running MySQL server that I manage with phpMyAdmin. This I do on my own for a non profit group who needed a Web site but I offered to help as our IT staff at work is limited. I think the big hitch in the process will be getting this .XLS sheet into the DB in some sort of useable format (I think anyway). I am pretty sure once I do this I can build a custom SE using PHP and HTML connecting to the DB.
Import CSV
I have exported data from ms-access in CVS format (Comma Separated Values) & now I want to import them into mysql. I have created the same fields in the same order & same characteristics. I use mysql 3.23 & a gui to operate it (Mysql Query Browser). I just cant import the data into the mysql tables.
Import Of Db
I have a database that has innodb tables with foreign keys. The export via phpmyadmin runs fine. When I try to import the db I receive foreign keys errors for tables that have a reliance on tables that come "after" it.The table structure is already in place, just that the tables are empty and I am trying to place the data in them. Am I exporting this incorrectly? I have started doing this one table at a time, but that is a pain and slow. Is there another way?
Import A Csv
how do you correctly import a csv i keep getting a Warning: mb_strpos(): Unknown encoding or conversion error. in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/string.lib.php on line 112 msg
CSV Import
while importing CSV file, I loose information about special characters (using: phpmyadmin). All those characters are converted into ? Can someone help me with that? If converting those symbols firstly into some numbers (for example è into 001, È into 002, etc.) and then replacing those values in the MySQL records, how can I do that with help of PHP or some other command?
Import A .sql File
Ok, probably any easy task but not having much luck here. i exported to an .sql file a database from phpmyadmin. now, what i want to do is use that file to recreate the database on my local test machine. i do not have phpmyadmin installed on this system, so am looking for the proper query i can use at mysql command line to run.
Commandline Sql Import
mysql -u chmcradiology -p chmcradiology --max_allowed_packet=16M < projects_pc.sql database and user exist (I can log in via the command line), max allowed packet because it's a 3 MB .sql file, and the .sql file does exist. Running the command doesn't output any errors, it just does nothing (and quickly, too)
Import Problem
I am trying to export information from an Access database to Mysql. I am running into a problem on some tables in the date field. In access the date field's default value is Now() When i try to import this into mysql i get the following error - SQL: CREATE TABLE `XPtrack` ( `Cnumber` INTEGER DEFAULT 0, `startxp` INTEGER DEFAULT 0, `finxp` INTEGER DEFAULT 0, `id` INTEGER DEFAULT 0, `date` DATETIME DEFAULT 'Now()', `info` VARCHAR(50), INDEX (`Cnumber`), INDEX (`id`)) TYPE=MyISAM - Error: -2147467259 (80004005) [MySQL][ODBC 3.51 Driver][mysqld-5.0.27-community-nt-log]Invalid default value for 'date'
Table Import
MySql limits the size of the records that you can import in one time. I have a large table coming from MS Access and I like (need) to import this in MySQL to work afterwards with this. What are the different ways to import in one time a large table. This MySQL database is my backend for a php driven website. A conversion to a csv file first ?
Import Query
Im trying to write a small app that enables a user 2 import a file into mysql. Some of the txt files have column heading, is there in the MySQLImport fuinction to ignore this 1st line of the txt file (i.e the Headings line).
Import And Export
i am using mysql 7. i had a friend setup a php and mysql combination for my website. i am now trying to learn how to administrate it. i would like to export the dbs from my prod server, and import on a test server, and view the tables. i believe i have figured out how to export: mysqldump -user -pass dbname > filename.sql, but am having trouble importing to a new mysql installation (possibly because i dont have a db there?) can you please explain how to perform this?
|