表达式任务没有按预期工作 - 请帮我写出正确的表达式! [英] Expression Task does not working as expected- please help me to write the correct expression!
问题描述
你好b $ b这个看起来很小 - 但它对我不起作用,我在最后几个小时都拉着头发 -
有一个包含csv文件的文件夹。 2个文件名以INDIA开头,ne文件以MEXICO开头。
我需要将INDIA文件加载到dbo.Indian表和MEXICO文件到dbo.MEXICO表中。
1.我拉了一个ForEach循环文件Enumarator-给出了文件夹路径和文件类型,提到*。*。文件名在变量"User :: FileName"中捕获。
2.然后,在此内部,拉出一个空的序列容器
3.Inside,我拉了一个表达式任务并按照子串(用户:文件名,1,2)=="IN"写入xpression。 &安培;子串(用户:文件名,1,2)==" ME"
4.然后对于第一个先例constaint,我创建了一个DFT来加载dbo.Indian表和第二个Precedent约束,我创建另一个DFT加载到dbo.Mexico表。
5.Flat file conn mgr - >将表达式设置为User:FileName
现在,当我运行包时,它会在上面的步骤3停止-ie)表达式任务 - 不会进行步骤4 - 请参阅随附的截图-pls help!
Hi,
This one looked like a small one - but its not working for me and I am pulling my hair for the last couple of hours -
There is a folder with csv files. 2 filenames start with INDIA and ne file start with MEXICO.
I need to load INDIA files into dbo.Indian table and MEXICO files into dbo.MEXICO table.
1.I pulled a ForEach Loop File Enumarator- gave the folder path and file type mentioned as *.*. The filename is captured in the variable "User::FileName"
2.Then, inside this, pulled a empty sequence container
3.Inside that, i pulled one Expression task and wrote the xpression as is Substring(user:Filename,1,2)=="IN" & Substring(user:Filename,1,2)=="ME"
4. Then for first precedent constaint, i created a DFT to load dbo.Indian table and for the second Precedent constraint, i created another DFT to load into dbo.Mexico table.
5.Flat file conn mgr -> Set the expression to User:FileName
Now, when I run the package, it stops at the step 3 above -ie) Expression task --its not going to step 4 - pls see the attached screenshot -pls help!
推荐答案
Hi Revathy,
Hi Revathy,
我已经在你之前的帖子中给你一个答案。
I already provided you an answer in your previous post.
没有必要蘑菇这个论坛有同样的问题。
There is no need to mushroom this forum with the same question.
只需删除这篇文章。
Just delete this post.
这篇关于表达式任务没有按预期工作 - 请帮我写出正确的表达式!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!