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 |
|
ramdas
Posting Yak Master
181 Posts |
Posted - 2003-01-28 : 12:35:28
|
| Hi folks,I am using DTS to import Data From a Oracle 8i database to SQL Server 2000. I am running into trouble on a column called Date-of-birth which is of type Date in oracle8i and is a datetime in SQL Server 2000. I tried using the activexscript in DTS to convert bad dates into NULL but it did not work. So I want to use a Query on Oracle8i to convert DOB to NULL values if it is not a valid date. Does anybody know of a CASE statement equivalent in Oracle8i.ByeRamdas NarayananSQL Server DBA |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-01-28 : 12:39:22
|
| Ummmm, yes. CASE:SELECT CASE WHEN dateCol <> valid THEN Null ELSE dateCol ENDOnly the searched CASE form is valid in Oracle, this form is not:SELECT CASE colValueWHEN 1 THEN Null WHEN 2 THEN 'A' WHEN 3 THEN 'B' ELSE 'C' END |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-01-29 : 02:03:29
|
| Hi,The Oracle DECODE function fills in for the SQL Server COALESCE and CASE functions:DECODE (value_to_test,expression1, value1,expression2, value2...,default_value) OS |
 |
|
|
|
|
|