on 10-07-2011 3:21 PM
Hi,
I need some helps regarding the insert of space string into a varchar column.
I try to do that :
Here the Table,
Name;Data Type;Dim;Code;Key;Not Null;Default;Comment
M_OID;FIXED;28;;;X;;
PROPERTY_NAME;VARCHAR;256;ASCII;;;;
PROPERTY_TYPE;FIXED;2;;;;;
PROPERTY_INDEX;FIXED;3;;;;;
NUMBER_VALUE;FIXED;28,6;;;;;
STRING_VALUE;VARCHAR;2000;ASCII;;;;
DATE_VALUE;TIMESTAMP;;;;;;
The query
INSERT INTO COMPONENT_PROPERTY(PROPERTY_INDEX, PROPERTY_TYPE, STRING_VALUE, NUMBER_VALUE , DATE_VALUE, PROPERTY_NAME, M_OID) VALUES (?, ?, ?, ?, ?, ?, ?) Parameters : [,2, ,,,separator,19814]
So the STRING_VALUE (3rd entry) has the value ' ' (one space) and the value inserted in the database is empty varchar without length.
How can I do this insert to have exactly the space in the DB
DB configuration, Driver JDBC configuration or Query configuration?
I have the same issue if I have a single space at the end of a sentence, this space is deleted and it's not in a SELECT Query
Thanks a lot for your helps,
Nicolas
Hi Nicolas,
I have to disappoint you: no way to insert single spaces (and spaces at the end of an char string) as significant character values. MaxDB treats trailing blanks as not significant and cuts them off. You need to have your app to handle this, for instance with an additional length column.
Regards,
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.