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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 "CASE" in SSIS

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-11-29 : 11:06:05
which object i need to choice to make "CASE" statment in ssis.

for example:

SELECT
table1.field1
CASE)
WHEN table1.field2='AA' then 'AA'
WHEN table1.field2='BB' then 'BB'
END)
FROM table1.

thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-29 : 11:34:24
use conditional operator (?:)

field2=='AA'?'AA':'BB'


http://msdn.microsoft.com/en-us/library/ms141680.aspx
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-11-29 : 12:27:54
so,ssis have not object?
how i use it in ssis,which object i should use it?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-29 : 12:45:19
quote:
Originally posted by inbs

so,ssis have not object?
how i use it in ssis,which object i should use it?


object? what object? can you explain your requirement?
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2008-11-29 : 13:48:10
sorry,very sorry i mean component.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-29 : 13:55:18
quote:
Originally posted by inbs

sorry,very sorry i mean component.


yup...it has various tasks as components. the metadata contain the columns which can be conditionaly checked and returned a value using conditional operator as shown. this is equivalent of case expression.
Go to Top of Page
   

- Advertisement -