Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-24 : 10:42:44
|
| Raj writes "Hi,My name is Raj Antony Vattakunnel and I am currently working on a project that involves migration of Oracle data to SQL Server. As part of the migration, I need to transform VARCHAR2 datatypes to SMALLINT datatype. For example, currently the values in the VARCHAR2 fields are: YES, NO while with the SQL server, it will be 0,1,etc... (at least thats what I am assuming.). I know DTS can be used to change the datatypes and will that be helpful. Or do I need to write a VB program that will translate the VARCHAR2 (YES/NO) to SMALLINT. Anyway, thanks for all your help in advance. Looking forward to your reply,Raj Antony VCity of Fort Worth,Texas" |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2002-04-24 : 11:19:28
|
| Raj, Instead of using a straight field copy in the DTS transformation task, you can use an ActiveX script to convert a field to another datatype. eg. If DTSSource("Oraclefield") = "YES" Then DTSDestination("SQLField") = 1 Else DTSDestination("SQLField") = 0 End ifHope this helps |
 |
|
|
|
|
|