Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 MySQL server (Toad freeware)

Author  Topic 

idsck
Starting Member

16 Posts

Posted - 2007-05-04 : 00:47:40
Hi all,
trying to import csv data to mysql server using Toad. however, there is no import function. What other options I have? thanks in advance..

Kristen
Test

22859 Posts

Posted - 2007-05-04 : 01:43:01
Sorry, this site is for support on Microsoft SQL Server. Try dbforums.

Kristen
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-04 : 03:56:22
or www.mysql.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

idsck
Starting Member

16 Posts

Posted - 2007-05-04 : 10:44:07
i meant M. SQL server not mysql
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-04 : 10:44:57
use Sql Server management studio.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-04 : 11:02:59
Can't say about Toad, but SQL Server has tools available for data import.

You can import from some sort of delimited file using BCP.

You can import from a Text file, Excel spreadsheet <Yuck!> and so on, but also from other databases (either using a database-specific driver, or just plain ODBC / OLE DB) using DTS.

Both are pretty efficient for large amounts of data - utilising Bulk Copy capabilities within the database to have a "reasonable" number of inserts per transaction, and so on.

Is your target SQL 2000 or SQL 2005?

Are you coming from Oracle? using Toad suggests that to me, so I could be wrong! - maybe some other source DB?

Kristen
Go to Top of Page

idsck
Starting Member

16 Posts

Posted - 2007-05-04 : 21:56:17
My target is M. SQL 2005.
My problem is i dont have privilege to access SQL Server's tools. I only have TOAD software serves as interface between me and SQL server.

Kristen: the options that you suggest, can I run it on SQL editor from TOAD software or I have to go to SQL server director\90\bin> to run BCP. Thank you for your times.


idsck

Go to Top of Page

idsck
Starting Member

16 Posts

Posted - 2007-05-04 : 21:56:21
My target is M. SQL 2005.
My problem is i dont have privilege to access SQL Server's tools. I only have TOAD software serves as interface between me and SQL server.

Kristen: the options that you suggest, can I run it on SQL editor from TOAD software or I have to go to SQL server director\90\bin> to run BCP. Thank you for your times.


idsck

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-04 : 22:07:44
As I know, there is TOAD for sql server. Not sure which TOAD you have, but you can run bcp. Why can you use other sql tools other than bcp?
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-05-05 : 00:14:52
"My problem is i dont have privilege to access SQL Server's tools"

when you say you don't have privileges to the ms client tools, do you mean you don't have them installed?

you can download a free version of the SQL Server client tools called SSMS Express if that's the issue.


www.elsasoft.org
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-05 : 02:00:58
"can I run it on SQL editor from TOAD software"

I'm pretty sure you can run a "bulk import" with standard SQL statements, but I've never done it so its not something I can help with.

I would recommend you install the SQL Client tools, I'm pretty sure they will get your data imported the quickest, even though you are familiar with Toad

Kristen
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-05-05 : 03:18:37
to do a bulk insert of a delimited file using T-SQL, see BULK INSERT in bol: http://msdn2.microsoft.com/en-us/library/ms188365.aspx


www.elsasoft.org
Go to Top of Page

idsck
Starting Member

16 Posts

Posted - 2007-05-05 : 14:22:36
tried the Bulk insert; however, keep getting me error like file doesn't exist and there is no syntax error found. Do you think it might be the privilege thing on my station?

will install sql client tool
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-05 : 18:01:18
Is the file on sql server's local disk? Have to start sql service with domain account if not.
Go to Top of Page

idsck
Starting Member

16 Posts

Posted - 2007-05-06 : 14:25:40
LOL @ id
Thanks rmiao.. I work remotely and the file was on local machine not server's local disk...


id
Go to Top of Page

MohammedU
Posting Yak Master

145 Posts

Posted - 2007-05-06 : 14:48:21
You can also use openquery/opnerowset...

How to import data from Excel to SQL Server
http://support.microsoft.com/default.aspx/kb/321686


MohammedU
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-06 : 22:08:35
Use unc name instead of c:\.
Go to Top of Page
   

- Advertisement -