Issue Details (XML | Word | Printable)

Key: CORE-2585
Type: New Feature New Feature
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Ivan
Votes: 3
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Include Load File Infile in sql

Created: 05/Aug/09 11:30 AM   Updated: 17/Oct/17 07:55 PM
Component/s: ISQL
Affects Version/s: 3.0 RC2
Fix Version/s: None

Environment:
win xp 64 bit, win server 2008 64 bit, Linux 64 Bit, solaris 64 Bit



 Description  « Hide
I have request for new features and is about included a "Load file" in sql.

Example

LOAD DATA INFILE 'c:\data.txt' INTO TABLE my_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 05/Aug/09 12:27 PM
I think this might be something to add to ISQL, maybe as an extension to input. It should not be part of the normal SQL dialect since it does not make a lot of sense for remote clients to execute (not to mention potential security issues).

You can already achieve this by creating an external table (although you need a fixed width record format) and do an insert (...) select <record> from <external table>, or using external tools to load the content of a csv or other format and insert it.

Ivan added a comment - 14/Oct/09 03:14 PM
but "Load" function is nice and very helpfull.

Volker Rehn added a comment - 17/Oct/17 07:42 PM - edited
@Mark, external tables have a number of issues, but the fixed length format makes them unusable for just about anything, be it csv or an ini-file.

Bulk data import is the topic, *built-in*, without programming interfaces/plugins or the usage of external tools,
And it is usually no problem that the file resides on the server. This can be arranged for.

Couldn't vote this feature high enough.

... and its OUTFILE counterpart.