I don't know if I'm using it wrong, but I can't execute this query without the TRIM function. Is this normal?
SELECT TRIM(P.RDB$USER) FROM RDB$USER_PRIVILEGES AS P INNER JOIN SEC$USERS AS U ON TRIM(P.RDB$USER) = U.SEC$USER_NAME WHERE P.RDB$PRIVILEGE = 'M' AND P.RDB$USER_TYPE = 8 AND P.RDB$OBJECT_TYPE = 13 AND P.RDB$RELATION_NAME = ?
Yes, this is normal, because the metadata tables use CHAR(63) (or (CHAR(31) in 3.0 and older) columns, which means they are padded with spaces up to the declared length.
Hi all,
I don't know if I'm using it wrong, but I can't execute this query without the TRIM function. Is this normal?
SELECT TRIM(P.RDB$USER) FROM RDB$USER_PRIVILEGES AS P INNER JOIN SEC$USERS AS U ON TRIM(P.RDB$USER) = U.SEC$USER_NAME WHERE P.RDB$PRIVILEGE = 'M' AND P.RDB$USER_TYPE = 8 AND P.RDB$OBJECT_TYPE = 13 AND P.RDB$RELATION_NAME = ?