数据如下:小王 a b c
小刘 a b c d
小陈 a b c d e
小李 a b c
小虎 a b c d e f
数据有上万条
想导入后格式和这个数据格式一样,只是分列显示,其之间的分隔符为TAB
由于列数不定,所以无法利用普通方法导入,我必须提前创好表,表的列数是根据数据最大列数设计的,但是如果用其他方法无法保障导入后的数据无丢失及格式一致
得知SSIS可以导入不固定列的数据
但是不得其法,不会用
在派生列表达式方面不知道如何写,感谢各位大侠指教

解决方案 »

  1.   

    表达式中写 substring(列,1,2).什么的.就可以的.
      

  2.   

     substring(列,1,2)是起到什么效果呢
    在列中需找2第一次出现的位置?
    可是如何达到我分列导入的功能呢
    就是这个表达式不太明白效果
      

  3.   

    派生列就是这样呀..
    比较你有一个字段.数据是"123456"
    那添加一个派生列.表达式中写substring(字段,1,2)
    那这个派生列的数据.就是12
      

  4.   

    那也就是substring(字段,‘tab’,len(第二个tab首位-第一个tab首位))
      

  5.   

    http://topic.csdn.net/u/20090701/11/82AE700B-5749-43E7-B03D-E1D5B1536F6D.html
      

  6.   

    if your table name never changed, you can get the table columns from system table and creatte a dynamic SP to get you information for table, after you transfered the data from datasource, you should make a row-column convert in DB side.I think this will get what you need.
    Ray