dbTalk Databases Forums  

Oracle hexadecimal query

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Oracle hexadecimal query in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
nivS1978@gmail.com
 
Posts: n/a

Default Oracle hexadecimal query - 03-06-2008 , 05:23 AM






A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...

Reply With Quote
  #2  
Old   
nivS1978@gmail.com
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 05:26 AM






On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:
Quote:
A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...
I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...


Reply With Quote
  #3  
Old   
nivS1978@gmail.com
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 05:26 AM



On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:
Quote:
A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...
I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...


Reply With Quote
  #4  
Old   
nivS1978@gmail.com
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 05:26 AM



On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:
Quote:
A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...
I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...


Reply With Quote
  #5  
Old   
nivS1978@gmail.com
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 05:26 AM



On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:
Quote:
A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...
I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...


Reply With Quote
  #6  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 07:08 AM



On Mar 6, 5:26*am, nivS1... (AT) gmail (DOT) com wrote:
Quote:
On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:





A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...

I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...- Hide quoted text -

- Show quoted text -
Without the Oracle release to at least four numbers, the DDL to create
the table and some sample data to illustrate your point it's
difficult, if not impossible, to provide you an answer.

Provide the requested information.


David Fitzjarrell


Reply With Quote
  #7  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 07:08 AM



On Mar 6, 5:26*am, nivS1... (AT) gmail (DOT) com wrote:
Quote:
On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:





A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...

I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...- Hide quoted text -

- Show quoted text -
Without the Oracle release to at least four numbers, the DDL to create
the table and some sample data to illustrate your point it's
difficult, if not impossible, to provide you an answer.

Provide the requested information.


David Fitzjarrell


Reply With Quote
  #8  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 07:08 AM



On Mar 6, 5:26*am, nivS1... (AT) gmail (DOT) com wrote:
Quote:
On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:





A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...

I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...- Hide quoted text -

- Show quoted text -
Without the Oracle release to at least four numbers, the DDL to create
the table and some sample data to illustrate your point it's
difficult, if not impossible, to provide you an answer.

Provide the requested information.


David Fitzjarrell


Reply With Quote
  #9  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 07:08 AM



On Mar 6, 5:26*am, nivS1... (AT) gmail (DOT) com wrote:
Quote:
On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:





A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...

I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...- Hide quoted text -

- Show quoted text -
Without the Oracle release to at least four numbers, the DDL to create
the table and some sample data to illustrate your point it's
difficult, if not impossible, to provide you an answer.

Provide the requested information.


David Fitzjarrell


Reply With Quote
  #10  
Old   
nivS1978@gmail.com
 
Posts: n/a

Default Re: Oracle hexadecimal query - 03-06-2008 , 07:25 AM



On 6 Mar., 14:08, "fitzjarr... (AT) cox (DOT) net" <fitzjarr... (AT) cox (DOT) net> wrote:
Quote:
On Mar 6, 5:26*am, nivS1... (AT) gmail (DOT) com wrote:





On 6 Mar., 12:23, nivS1... (AT) gmail (DOT) com wrote:

A quick and simple question.

If I have a query like:
SELECT * FROM table NUM = 31

Now for reasons irelevant to my question the number provided is
hexadecimal. I could ofcourse in the program convert this to a number
but is there a syntax in oracle to use similar to the sql server:
SELECT * FROM table NUM = 0x1F

How do I write this in oracle?

I know I can do a to_num('1F','XX') or something like that but is
there a way to just write a hexadecimal number directly?

Regards Hans Milling...

I ofcourse forgot a WHERE...

SELECT * FROM table WHERE num = 0x1F

Also the column is of type int/number or something like that, not a
raw.

Hans...- Hide quoted text -

- Show quoted text -

Without the Oracle release to at least four numbers, the DDL to create
the table and some sample data to illustrate your point it's
difficult, if not impossible, to provide you an answer.

Provide the requested information.

David Fitzjarrell- Skjul tekst i anførselstegn -

- Vis tekst i anførselstegn -
It's oracle 10g, anyway why do you need DDL and sample data to answer
this question?
If you have a table with numbers (integer) and you want to select all
rows where the number is 31. Can you write 31 as 1F hexadecimal number
in the query or does oracle only support the use of integer/numbers? I
would guess if Oracle did support this it would have from the first
version and it would not be so hard to give an answer or find the
answer on google.

Hans...


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.