Toad World® Forums

[TOADSQL] importing csv files


#1

[TOADSQL] importing csv files


#2

Evening Dan,

this is more of a Toad question than a ToadSQL question, so I’ve CC’d
the Toad group as well - just in case anyone else wants to ring in.

I’m new to toad and oracle.
Which version of Toad are you using?

I have some small files I want to import - a
few hundred to a few thousand records.
Shouldn’t be a problem. The subject mentions that these are CSV files -
is this the case?

In sql server I could use insert
into statements but when I try to put multiple insert into statements in
toad, I get an error message about illegal character.
It depends on the version, but you could do it like this:

INSERT INTO table_name (Col_1, Col_2, …)
VALUES (Value_1, Value_2, …) ;

INSERT INTO table_name (Col_1, Col_2, …)
VALUES (Value_1, Value_2, …) ;

COMMIT;

You need the semi-colon at the end of each insert. When you have filled
the editor with all the required statements, you press F5 (Execute as
script) to run the whole lot as a script.

I’ve read about sql loader but I apparently don’t have it one my system.
You will need to install the Oracle Clinet on your desktop/laptop. There
are a few options in that installer - the full set, a developer set, and
end user set. It sounds like you have the end user set - which gives you
the barest essentials for connecting to a database using an application.

The developer set should, I think, have sql*loader in it. The full admin
version certainly does.

I tried to use database>import> import sourec files but I couldn’t
figure out how to get the data loaded after adding the file to the
dialog. I loaded it into the editor but didn’t know what to do after that.
I’m away from my desk at the moment (it evening in the UK!) so I’m
unable to advise you accurately on this point. However, there are plenty
people around on the TOAD list who will be at their desks right now who
will probably help!

If not, tomorrow.

Any help will be greatly appreciated.
Hope the above gets you started.

Cheers,
Norm. [TeamT]