I am working with a firebird database and my problem is that all my data is stored with whitespace on the 'right'. When I query some information to use it in a different program (AutoIt) I am stuck with the whitespace.
UPDATE tableName SET columnName = TRIM( columnName )
UPDATE DETECTION SET DNAME = right(TRIM (DNAME));
I have tried such things but it is useless, unfortunately.
I am trying to update my whole database because all the trim right is useless for me!
----------------------------UPDATE--------
I am still having problems
It does not work, maybe I am just stupid with also executing it proper
SELECT a.DNAME, a.DTYPE, a.WINNAME, a.AREA, a.COLOR, a.MOUSE
FROM DETECTION a -- this is my table
when i try;
UPDATE DETECTION SET DNAME = trim( DNAME)
Executing...
Done.
287 fetches, 56 marks, 0 reads, 0 writes.
0 inserts, 28 updates, 0 deletes, 0 index, 28 seq.
Delta memory: 8648 bytes.
DETECTION: 28 updates.
28 rows affected directly.
Total execution time: 0.021s
Script execution finished.
Commiting transaction...
Done.
Starting transaction...
Preparing query: UPDATE DETECTION SET DNAME = trim( DNAME)
Prepare time: 0.022s
PLAN (DETECTION NATURAL)
when I try
UPDATE DETECTION SET DNAME = trim(tailing from DNAME)
i get the following error
Error: *** IBPP::SQLException ***
Context: Statement::Prepare( UPDATE DETECTION SET DNAME = trim(tailing from DNAME) )
Message: isc_dsql_prepare failed
SQL Message : -206
Column does not belong to referenced table
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -206
Column unknown
TAILING
At line 1, column 43
even when the first one executes proper it does nothing, my queries are still for with white-space trail at the end.