iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2009, 07:16 PM
vfaulkner's Avatar
WebProWorld Member
 
Join Date: Jul 2003
Location: Tampa Bay, Florida
Posts: 92
vfaulkner RepRank 0
Default Quick import csv to mySQL ?

I hope someone here can help, on a quick deadline...

I am new to mySQL as a database and I need to create table(s) to hold member data. The data is currently in several .csv formatted files.
Is there a quick to import the data for storage in mySQL? The searching/retrieving will come later.
When asking for number of fields, does that mean 26 headings like lastName or total, 26 headings times 1300 members/records?


I am using phpMyAdmin 2.11.9

Any other tips are welcome.

Thanks!
__________________
Vicki
V. Faulkner
www.VFWDS.com

_______________
Reply With Quote
  #2 (permalink)  
Old 06-29-2009, 07:32 PM
DaveSawers's Avatar
WebProWorld Veteran
 
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 492
DaveSawers RepRank 3DaveSawers RepRank 3
Default Re: Quick import csv to mySQL ?

Not sure what you're asking for here.

phpMyAdmin will directly import data from CSV files into MySQL. You can easily setup your CSV files in the necessary format for import by editing them in Excel or a text editor using a macro. To figure out exactly what the required format is, put in a couple of rows manually and export them to CSV.

Number of fields means number of columns in your table.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #3 (permalink)  
Old 06-29-2009, 08:25 PM
vfaulkner's Avatar
WebProWorld Member
 
Join Date: Jul 2003
Location: Tampa Bay, Florida
Posts: 92
vfaulkner RepRank 0
Default Re: Quick import csv to mySQL ?

When I tried to import, I received this error:
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 'Name.ID, Name.EMAIL, Name.MEMBER_TYPE, Name.CATEGORY, Name.TITLE


so I need to change the heading/field names?? I think the files were taken from Crystal Reports, if that matters.

Also, since I have several files which could be different tables, could I save time editing with Access then importing?
__________________
Vicki
V. Faulkner
www.VFWDS.com

_______________

Last edited by vfaulkner; 06-29-2009 at 08:30 PM.
Reply With Quote
  #4 (permalink)  
Old 06-30-2009, 09:25 AM
DaveSawers's Avatar
WebProWorld Veteran
 
Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 492
DaveSawers RepRank 3DaveSawers RepRank 3
Default Re: Quick import csv to mySQL ?

You need to change the CSV files so they are in the right format. What does a sample line in the CSV file look like?
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #5 (permalink)  
Old 06-30-2009, 07:40 PM
ronchalice's Avatar
WebProWorld Pro
 
Join Date: Oct 2006
Location: Colorado
Posts: 132
ronchalice RepRank 2ronchalice RepRank 2
Default Re: Quick import csv to mySQL ?

Quote:
Originally Posted by vfaulkner View Post
When I tried to import, I received this error:
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 'Name.ID, Name.EMAIL, Name.MEMBER_TYPE, Name.CATEGORY, Name.TITLE
The "NAME." identifies the table name that Crystal extracted from. Just do a global S&R to remove the "NAME." from the column heading. So you end up with column headings of EMAIL, MEMBER_TYPE, CATEGORY, ETC.

However, if you don't have a large number of tables to import, I'd recommend manually editing all of the column headers to get rid of all caps. Just make sure they're meaningful to you, and don't contain any spaces or unusual characters (e.g. try mbr_name, mbr_email, mbr_type, mbr_category, etc... a little time up front in getting the table right will save you a lot of time in the future.
Reply With Quote
  #6 (permalink)  
Old 09-28-2009, 12:52 PM
WebProWorld New Member
 
Join Date: Sep 2009
Posts: 14
freezea RepRank 0
Default Re: Quick import csv to mySQL ?

Download myadmin and you can do it via your browser in a couple of sec's.
regards,
freezea~
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cms capable of handling db import MattE Database Discussion Forum 2 08-07-2008 07:39 AM
phpMyAdmin - Export & Import edhan Database Discussion Forum 5 06-04-2008 11:03 PM
Recommend you an Import Excel tool samnav Database Discussion Forum 0 04-02-2008 06:46 AM
How to import a .bak file into a new SQL server spenland Database Discussion Forum 15 08-24-2007 08:29 PM
Import URL Addresses into Excel mkinzie1 Yahoo! Discussion Forum 2 02-20-2007 03:16 PM


All times are GMT -4. The time now is 07:47 AM.



Search Engine Optimization by vBSEO 3.3.0