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

sql2json does not support INSERT INTO ... VALUES(a,b), (c,d) syntax #11

Closed
galz opened this issue Aug 29, 2016 · 4 comments
Closed

sql2json does not support INSERT INTO ... VALUES(a,b), (c,d) syntax #11

galz opened this issue Aug 29, 2016 · 4 comments

Comments

@galz
Copy link

galz commented Aug 29, 2016

This came up on StackOverflow.

The following syntax for sql2jaon works well and shows both inserted rows:

CREATE TABLE `geo_tags` (
  `gt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gt_page_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`gt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4507036 DEFAULT CHARSET=binary ROW_FORMAT=DYNAMIC;

INSERT INTO `geo_tags` VALUES (3,487781);
INSERT INTO `geo_tags` VALUES (4,487781);

But using a shorter syntax for the INSERT, which is usually used by mysqldump, would only show the first value:

CREATE TABLE `geo_tags` (
  `gt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `gt_page_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`gt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4507036 DEFAULT CHARSET=binary ROW_FORMAT=DYNAMIC;

INSERT INTO `geo_tags` VALUES (3,487781),  (4,487781);
@galz
Copy link
Author

galz commented Aug 29, 2016

@martindrapeau - and nice work!! Very useful tool :)

@martindrapeau
Copy link
Collaborator

This format is not currently supported. Good feature request.

martindrapeau added a commit that referenced this issue Aug 30, 2016
@martindrapeau
Copy link
Collaborator

Fixed. Thanks for reporting. Here is your testcase:
http://www.csvjson.com/sql2json/688575184b1e31c39c1fd8786f0509ec

@galz
Copy link
Author

galz commented Aug 30, 2016

@martindrapeau - amazing! Thank you!

hisabimbola pushed a commit to hisabimbola/csvjson-app that referenced this issue Oct 7, 2017
This PR allows the user to select whether to allow single quote or double quote around values

FlatFilers#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants