Hello,

> I'm using the build mentioned in the subject, 32-bit, on Windows 7 64-bit.
>
> In a UTF8 database, I have a table with the following name:
>
> A_VERY_LONG_TABLENAME
>
>
> And a package with a single selectable SP, basically querying the table
> names:
>
> SET TERM ^^ ;
> CREATE OR ALTER PACKAGE PKG_SCHEMA_1 AS
> begin
>     procedure s_user_tables returns (relation_name type of column
> rdb$relations.rdb$relation_name);
> end
>    ^^
> SET TERM ; ^^
> SET TERM ^^ ;
> RECREATE PACKAGE BODY PKG_SCHEMA_1 AS
> begin
>     procedure s_user_tables returns (relation_name type of column
> rdb$relations.rdb$relation_name)
>     as
>     begin
>       for
>         select rdb$relation_name from rdb$relations
>         where
>           (rdb$system_flag = 0 or rdb$system_flag is null)
>           and (rdb$view_blr is null)
>         order by
>           rdb$relation_name asc
>         into
>           :relation_name
>       do
>       begin
>         suspend;
>       end
>     end
> end
>    ^^
> SET TERM ; ^^
>
>
> In isql:
>
> SQL> set names UTF8;
> SQL> connect localhost/5050:fb3demo.fdb user sysdba password masterkey;
> Commit current transaction (y/n)?y
> Committing.
> Database:  localhost/5050:fb3demo.fdb, User: sysdba
> SQL> select * from pkg_schema_1.s_user_tables;
>
> RELATION_NAME
> =============
> Statement failed, SQLSTATE = 22001
> arithmetic exception, numeric overflow, or string truncation
> -string right truncation
> -expected length 10, actual 21
> SQL>

Seems to be a problem with using the TYPE OF clause for the data type. 
When I replace that with e.g. VARCHAR(50) the string truncation error 
message is gone.


Regards,
Thomas

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to