All Forums Database
tdreturn 25 posts Joined 10/12
04 Mar 2015
BITAND Function not working

All for some reason the BITAND function is not working. The query I am trying to run through SQL Assistant is SELECT BITAND(9,8);
The error I am getting is:
SELECT Failed. 9881: Function BITAND called with an invalid number or type of parameters
 
Any clue on what is going on?

dnoeth 4628 posts Joined 11/04
04 Mar 2015

Works for me, what's your TD release?
Which overloaded functions exist on your system?

SELECT DatabaseName, FunctionName, ParameterDataTypes 
FROM dbc.FunctionsV
WHERE FunctionName = 'BITAND'

 

Dieter

tdreturn 25 posts Joined 10/12
04 Mar 2015

Here is the ouput of the query. The version is 14.10.03.03
 
 TD_SYSFNLIB BITAND I8BF

SYSLIB BITAND BVD 

TD_SYSFNLIB BITAND I I 

TD_SYSFNLIB BITAND I2BF

TD_SYSFNLIB BITAND I2I2

TD_SYSFNLIB BITAND I8I8

TD_SYSFNLIB BITAND BVBV

TD_SYSFNLIB BITAND I1I1

SYSLIB BITAND CVCV

TD_SYSFNLIB BITAND I BF

TD_SYSFNLIB BITAND I1BF

 

tdreturn 25 posts Joined 10/12
04 Mar 2015

Figured it out. It is being overloaded so I basically did SELECT TD_SYSFNLIB.BITAND(9,8) and it worked. Thanks for making me think that it might be getting overloaded!

dnoeth 4628 posts Joined 11/04
04 Mar 2015

It's the BITAND in SYSLIB (previously installed as user UDFs at your site), which comes before TD_SYSFNLIB in the search path.
 

Dieter

You must sign in to leave a comment.