You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Submitted by: Wojtek (dlpl)
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
The text was updated successfully, but these errors were encountered: