Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COPY INTO does not allow OFFSET without specifying amount of records #3504

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

COPY INTO does not allow OFFSET without specifying amount of records #3504

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2014-06-25 16:16:56 +0200
From: @hannesmuehleisen
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2014-10-31 14:14:51 +0100

Comment 19856

Date: 2014-06-25 16:16:56 +0200
From: @hannesmuehleisen

Often, we know that a CSV file has a header, but we do not want to specify the number of rows to be imported. However, the COPY INTO command currently does only allow OFFSET 2 (to skip the header) to be specified when n RECORDS is also present. This makes little sense and should be fixed.

So,

COPY [ int_val [ OFFSET int_val ] RECORDS ] INTO table_name
FROM ( file_name ',' ... | STDIN )
[ [USING] DELIMITERS field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS null_string ] [LOCKED]

should be

COPY [ int_val RECORDS ] [ OFFSET int_val ] INTO table_name
FROM ( file_name ',' ... | STDIN )
[ [USING] DELIMITERS field_separator [',' record_separator [ ',' string_quote ]]] [ NULL AS null_string ] [LOCKED]

Comment 19893

Date: 2014-07-09 15:46:27 +0200
From: MonetDB Mercurial Repository <>

Changeset 08f2048691fb made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=08f2048691fb

Changeset description:

added limit without records in copy into. Beware this can only work
with file based input (not with streaming!) Fixes bug #3504

Comment 19983

Date: 2014-08-06 19:08:28 +0200
From: @njnes

fixed

Comment 20393

Date: 2014-10-31 14:14:51 +0100
From: @sjoerdmullender

Oct2014 has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant