Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2005

Tip: Looking for answers? Try searching our database.

Is it possible to Hexadecimal or Binary Value as the input to WHERE  clause in query?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Praveen - 07 Feb 2005 10:49 GMT
Hi,

I am a newbie in DB2 and mainframe technology. While compiling a query
I cam across a situation where I had to give a Hex value as the input
to a query; i.e. WHERE file_status = x'00'. Is this correct.

More over if I were to give a BINARY as the input instead, How is it
done?

Please forgive if my question is baseless and silly. Guide me please.

Thank you very much.
RdR - 07 Feb 2005 19:32 GMT
Hi,

You can try this:

"Select * from <table_name> where HEX(file_status)=x'00';" .

similar to "select HEX(file_status) from <table_name>;"

Hope this helps,

JWK(RdR)
> Hi,
>
[quoted text clipped - 8 lines]
>
> Thank you very much.
RdR - 07 Feb 2005 19:39 GMT
Ooops,

It should be without the "x" in between "=" and the first single quote:

"Select * from <table_name> where HEX(file_status)='00';"

Thanks,

RdR

> Hi,
>
[quoted text clipped - 19 lines]
> >
> > Thank you very much.
Praveen - 08 Feb 2005 05:13 GMT
Thanks a zillion RdR. That was really helpfull.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.