ssis(SQL Server 2008) [英] ssis (sql server 2008)

查看:126
本文介绍了ssis(SQL Server 2008)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的专栏如.....


客户和名称(列标题)
_____________________________________________

customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4Name
----------------------------------------------
customer5-Designation5,customer4-Designation4,customer5-Designation5,customer4-Designation4customer5-Designation,customer4-Designation4customer5-Designation5,customer4-Designation4 --->第二列
----------------------------------------------
customer6-Designation6- --->第三栏
---------------------------------------------
-
----------------------------------------------
-
----------------------------------------------
-
-

所以我想从每一列中获取子字符串客户".
我可以为该查询提供任何字符串函数和解决方案吗?

谢谢你.

i have column like........


Customer and designation (column heading)
_____________________________________________

customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4Name
----------------------------------------------
customer5-Designation5,customer4-Designation4,customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4customer5-Designation5,customer4-Designation4 ---> Second Colomn
----------------------------------------------
customer6-Designation6 ---> Third column
---------------------------------------------
-
----------------------------------------------
-
----------------------------------------------
-
-

so i want to get substring "customers" from each column.
can i have any string function and solution for this query.

Thank u .

推荐答案

U可以使用:
1.在SQL查询中获取所需的子字符串.如果您将OLEDB用作源,则直接访问表直接写查询以访问源OLEDB中的数据.如果您将Excel用作源,请不要使用它.



2.使用派生列并使用字符串函数.一个基本思路是,找到索引-"并将其设置为要返回的子字符串的长度.

谢谢,

Kuthuparakkal
U can use:
1. Get the required substring in SQL query. Instead accessing table direcly write queries to access data in Source OLEDB if you are using OLEDB as source. Please do not use this if you use Excel as source.

or

2. Use Derived column and use string functions. A basic idea would be, find index of "-" and set as the length for substring to be resturned.

Thanks,

Kuthuparakkal


这篇关于ssis(SQL Server 2008)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆