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)
 Execute SQL Task

Author  Topic 

JJ297
Aged Yak Warrior

940 Posts

Posted - 2009-03-05 : 11:39:35
Vijayisonly gave me this to use which works well in SQL:

select * from Diary02_13 where charindex('5w',DryCd1+DryCd2+DryCd3+...DryCd8) > 0
union all
select * from Diary02_13 where charindex('7w',DryCd1+DryCd2+DryCd3+...DryCd8) > 0
union all
select * from Diary02_13 where charindex('9w',DryCd1+DryCd2+DryCd3+...DryCd8) > 0


I tried putting this above code into SSIS Conditional Split but it doesn't like charindex. I tired to use FindString but couldn't get it to work. So I next moved to Execute SQL Task where I want the results to go into a new table.

I tried Select * into Test from but that didn't work. Any ideas? Help...

tmitch
Yak Posting Veteran

60 Posts

Posted - 2009-03-05 : 15:46:41
You can't use SQL in a conditional split. The syntax required is the Expression Language that is specific to SSIS.

Andy Leonard recently wrote a post on his blog about using the conditional split and the expression language. This should help you out:
http://sqlblog.com/blogs/andy_leonard/archive/2009/02/20/ssis-expression-language-and-the-conditional-split-transformation.aspx

hth,
Tim

---------------------

Tim Mitchell
www.BucketOfBits.com
Go to Top of Page
   

- Advertisement -