Byte(4) conversion?

Database
c19
Enthusiast

Byte(4) conversion?

Hi,

I have a table dbc.tvm with a databaseid (which is a byte(4) type) of 0000FA8E but I'm having trouble using it in a WHERE...

SELECT *
FROM dbc.tvm
WHERE databaseid = '0000FA8E'

I have tried casting it to a byte etc but no luck.

The error I am receiving is "Conversion between BYTE data and other types is illegal.

Any help would be appreciated.

Thanks

Michael
4 REPLIES
Enthusiast

Re: Byte(4) conversion?

Hi,
Try this... this will help you.

SELECT *
FROM dbc.tvm
WHERE databaseid = '0000FA8E'xb

Regds,
sachin khade
c19
Enthusiast

Re: Byte(4) conversion?

Hi,

Thanks for that it works great.

Out of interest could you explain what the xb is doing?

Thanks again

Michael
Enthusiast

Re: Byte(4) conversion?

Xb stands for hexadecimal
Enthusiast

Re: Byte(4) conversion?

More precisely, 'x' indicates that the form of the literal is hexadecimal, and 'b' indicates that the data type is byte.