[MonetDB-users] Insert tuples with special characters especially umlauts

Hallo everybody, I would like to know whether there exist any possibilities to add tuples with umlauts as characters (ä,ö,ü) or other special characters like ß to tables. I tried to use the regular INSERT-statement as well as the COPY INTO-statement with a csv input file but without success (unexpected end of input error or missing ' to close the string). Example: CREATE TABLE Umlautnamelist(CUST_ID numeric(9,0) not null, CUST_NAME varchar(100) not null, constraint Umlautnamelist_PK primary key (CUST_ID)); INSERT INTO Umlautnamelist (123456789,'Bräuer'); Are there any chances to get it working? Thank you in advance. Sebastian

Thank you for your interest in MonetDB. Sebastian Bräuer wrote:
Hallo everybody, I would like to know whether there exist any possibilities to add tuples with umlauts as characters (ä,ö,ü) or other special characters like ß to tables.
I tried to use the regular INSERT-statement as well as the COPY INTO-statement with a csv input file but without success (unexpected end of input error or missing ' to close the string).
Example: CREATE TABLE Umlautnamelist(CUST_ID numeric(9,0) not null, CUST_NAME varchar(100) not null, constraint Umlautnamelist_PK primary key (CUST_ID));
INSERT INTO Umlautnamelist (123456789,'Bräuer');
Are there any chances to get it working?
MonetDB is fully capable of dealing with accented characters, but it will only work with the UTF-8 encoding. If your data is in a UTF-8 encoded file, you can load it in using the COPY INTO query. If you are using mclient, then you may have to tell it (i.e. mclient) which character encoding it should use so that it can translate to and from UTF-8 when communicating with the server. For that there is the -E<encoding> flag, e.g. mclient -lsql -Eiso-8859-1 Usually mclient is able to determine the correct encoding from the environment, but it may be necessary to give it a hand. If mclient is using the correct encoding, your query should work. -- Sjoerd Mullender

Hi Sebastian, On Tue, Jun 09, 2009 at 03:23:34PM +0200, Sebastian Bräuer wrote:
Hallo everybody, I would like to know whether there exist any possibilities to add tuples with umlauts as characters (ä,ö,ü) or other special characters like ß to tables.
I tried to use the regular INSERT-statement as well as the COPY INTO-statement with a csv input file but without success (unexpected end of input error or missing ' to close the string).
Example: CREATE TABLE Umlautnamelist(CUST_ID numeric(9,0) not null, CUST_NAME varchar(100) not null, constraint Umlautnamelist_PK primary key (CUST_ID));
INSERT INTO Umlautnamelist (123456789,'Bräuer');
With the May2009 release on 64-bit Febora 10 using a UTF-8 shell, this works for me, once I fix the syntax of the insert statement: sql>CREATE TABLE Umlautnamelist(CUST_ID numeric(9,0) not null, CUST_NAME varchar(100) not null, constraint Umlautnamelist_PK primary key (CUST_ID)); 0 tuples sql>INSERT INTO Umlautnamelist (123456789,'Bräuer'); !syntax error, unexpected sqlINT in: "insert into umlautnamelist (123456789" 0 tuples sql>INSERT INTO Umlautnamelist values (123456789,'Bräuer'); Rows affected 1 sql>select * from Umlautnamelist; +------------+-----------+ | cust_id | cust_name | +============+===========+ | 123456789 | Bräuer | +------------+-----------+ 1 tuple sql>
Are there any chances to get it working?
Apparently yes ;-) Stefan
Thank you in advance.
Sebastian
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
participants (4)
-
Sebastian Bräuer
-
Sjoerd Mullender
-
Stefan de Konink
-
Stefan Manegold