Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Server uniqueidentifier cast to binary...what is equivalent in Oracle?

616017Sep 24 2008
Hi,

I am having trouble understanding equivalent data types in my conversion from SQL Server to Oracle.

Let's say I have this statement in SQL Server, where the string being "passed in" is a uniqueidentifier:

select cast(substring('EFDA8997-63AA-4F33-96CF-29BFC2CE252E',8,1) as binary(1));

The tool I've used to convert this to Oracle says the equivalent statement to this is (where the string being "passed in" is a char:

select cast((substr('EFDA8997-63AA-4F33-96CF-29BFC2CE252E',8,1)) as raw(1)) from dual;

However, I get different results when testing these two statements:
SQL Server: 0x37
Oracle: 07

What is the correct what to convert this statement to Oracle?

Thank you!
Mimi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 22 2008
Added on Sep 24 2008
0 comments
3,418 views