Subject | Re: [firebird-support] size of the field |
---|---|
Author | Helen Borrie |
Post date | 2004-03-11T00:17:15Z |
At 11:15 PM 10/03/2004 +0000, you wrote:
characters in an actual item of data.
If you need to determine the defined size of a column, you would have to
query the system tables RDB$RELATION_FIELDS and RDB$FIELDS. For metadata
info on the system tables, see the IB 6 Language Reference. As a comment,
you would have to have some serious justification for using SQL to check
length limits for every insert or update query. This would be very
costly. It is much cheaper to do input size validations on the client; or
simply to handle overflow exceptions.
/heLen
>Hi,That is not valid SQL. You must use single quotes for delimiting strings.
> Is there a strlen statement in FireBird SQL to get the size of a
>field? For example...
>
>If i do "INSERT INTO TABLE1( field1 ) VALUES( "ABC" );
>then is something likeThere is an UDF strlen() (and also substrlen()) for getting the number of
>
>SELECT strlen(field) from TABLE1; ?
characters in an actual item of data.
If you need to determine the defined size of a column, you would have to
query the system tables RDB$RELATION_FIELDS and RDB$FIELDS. For metadata
info on the system tables, see the IB 6 Language Reference. As a comment,
you would have to have some serious justification for using SQL to check
length limits for every insert or update query. This would be very
costly. It is much cheaper to do input size validations on the client; or
simply to handle overflow exceptions.
/heLen