June 9, 2009 at 4:41 am
I am using SSMA 2005 for Oracle V4.0.1387 for migrating objects and data from Oracle database to Sql Server 2005.
I have one table in Oracle named as Client and the datatype of one column (ClientData) is RAW. After successful migration through SSMA in Sql Sever 2005, the table name (Client) and datatype of ClientData column is VarBinary (*). The datatype mapping of RAW to binary/varbinary is default settings of SSMA.
After data migration, for example consider the value of one row is 10 (Decimal) in RAW datatype column (ClientData). So it is stored in Oracle as like '00310030' and in SQL Server 2005 as '0x00310030'.
I used the following query for retrieving VarBinary data from Sql Server 2005.
select cast(ClientData as Varchar(512)) from Client
But it returning null/some junk values.
How do I convert VarBinary value into VarChar format? In my GUI application I needed this value as Varchar format.
Siva Kumar
Sivakumar
June 11, 2009 at 2:54 pm
Oracle RAW datatype?
:w00t: If I remember correctly RAW got deprecated after Oracle 7.3.4 just before the Permian Extinction -on Ora8i systems forward it should have been replaced by BLOB... BFILE in the case of LONG RAW
RAW datatype was meant for data Oracle didn't have to interpret, just store it and pass it back to the application when required.
The closest match on SQL Server should be BINARY, with no conversion at all.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy