Subject | Odp: [firebird-support] bin_and() in Firebird 2. 5.2 |
---|---|
Author | liviuslivius@poczta.onet.pl |
Post date | 2013-10-29T04:46:23Z |
Hi,
Single quote is for string not number. Why you need it? For external function it is converted from string to number.
If you declare external function you are limited to 2 arguments internal function have not this limitation. And i always prefere internal then external.
Gbak have no problems but without knowing what are "others" i can not say anythink more.
Regards,
Karol Bieniaszewski
Single quote is for string not number. Why you need it? For external function it is converted from string to number.
If you declare external function you are limited to 2 arguments internal function have not this limitation. And i always prefere internal then external.
Gbak have no problems but without knowing what are "others" i can not say anythink more.
Regards,
Karol Bieniaszewski
----- Reply message -----
Od: "Keisuke Kumakura" <kkuma@...>
Do: <firebird-support@yahoogroups.com>
Temat: [firebird-support] bin_and() in Firebird 2.5.2
Data: wt., paź 29, 2013 01:34
Od: "Keisuke Kumakura" <kkuma@...>
Do: <firebird-support@yahoogroups.com>
Temat: [firebird-support] bin_and() in Firebird 2.5.2
Data: wt., paź 29, 2013 01:34
Hello,
The SQL statement:
select some from foo where bin_and(bar, '2')<>0;
results in the error:
Arguments for BIN_AND must be integral types or NUMERIC/DECIMAL without
scale
But if we omit single quote around 2(i.e., bin_and(bar, 2)<>0),
the statement is executed fine.
If we declare the following function, the statement is
executed fine irrespective of bin_and(bar, '2') or bin_and(bar, 2).
DECLARE EXTERNAL FUNCTION bin_and
INTEGER, INTEGER
RETURNS INTEGER BY VALUE
ENTRY_POINT 'IB_UDF_bin_and' MODULE_NAME 'ib_udf';
a. Is it illegal to single-quote numeric(e.g., '2') ?
b. Does overriding internal bin_and, bin_or functions pose
any problems for firebird utilities like gbak, nbackup and
others ?
regards,
K. Kumakura