| Summary: | SQL Insert confuses the VALUES with the COLUMNS/FIELDS | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | emanuel.feruzi |
| Component: | Base | Assignee: | Not Assigned <libreoffice-bugs> |
| Status: | RESOLVED NOTABUG | ||
| Severity: | major | CC: | lionel, serval2412 |
| Priority: | medium | ||
| Version: | 3.5.4 release | ||
| Hardware: | x86 (IA32) | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | Database | ||
On pc Debian x86-64 with 3.6 sources updated today, I reproduced this problem. Lionel: it may interest you so put you on cc In ANSI SQL, strings are enclosed in simple quotes, not double quotes. The correct INSERT statement is:
INSERT INTO "countries" ("country", "short", "dialcode", "continentid") VALUES ('Tanzania', 'TZ', 255, 0);
In double quotes can *only* by identifiers (table names, column names, ...).
|
Created attachment 70752 [details] Database I created the database with a countries table. See attachment. When I run an insert statement: INSERT INTO "countries" ("country", "short", "dialcode", "continentid") VALUES ("Tanzania", "TZ", 255, 0); I get an error: 5: Column not found: Tanzania