Pading strings with spaces to longest string in queries with union
------------------------------------------------------------------

                 Key: CORE-5916
                 URL: http://tracker.firebirdsql.org/browse/CORE-5916
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0.3
         Environment: WIndows 7
            Reporter: Wojtek
            Priority: Minor


I have query using union all to add many records to database at one time. But 
in each varchar field spaces are added at the end. 
There is a sample demonstrating problem:


SELECT
        COL,
        REPLACE(COL, ' ', '.'),
        CHAR_LENGTH(COL),
        CHAR_LENGTH(TRIM(COL))

FROM
(
        SELECT 'a' AS COL  FROM  RDB$DATABASE
        UNION ALL
        SELECT 'bbbbbbb' FROM  RDB$DATABASE
        UNION ALL
        SELECT 'cc' FROM  RDB$DATABASE
) 




And result:




COL     REPLACE CHAR_LENGTH     CHAR_LENGTH1
a       a...... 7       1
bbbbbbb bbbbbbb 7       7
cc      cc..... 7       2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to