_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › SSIS-Split

れ螻 螳 ssis れ襯 蠑碁磯螻...

01.png

OLE DB 覲 #

select 1 p_key, '1,100|2,200|3,300' money_log
union all
select 1 p_key, '6,600|5,500|4,400' money_log
union all
select 1 p_key, '7,700|8,800|9,900|10,1000' money_log

ろ襴渚 蟲煙 #

ろ襴渚 蟲煙 "out2"朱 豢レ 豢螳螻...
/* Microsoft SQL Server Integration Services Script Component
*  Write scripts using Microsoft Visual C# 2008.
*  ScriptMain is the entry point class of the script.*/

using System;
using System.Data;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

[Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute]
public class ScriptMain : UserComponent
{

    public override void PreExecute()
    {
        base.PreExecute();
        /*
          Add your code here for preprocessing or remove if not needed
        */
    }

    public override void PostExecute()
    {
        base.PostExecute();
        /*
          Add your code here for postprocessing or remove if not needed
          You can set read/write variables here, for example:
          Variables.MyIntVar = 100
        */
    }

    public override void 0_ProcessInputRow(0Buffer Row)
    {
        /*
          Add your code here
        */
        string[] result = Row.moneylog.Split(new char[] { '|', ',' });

        for (int i = 0; i < result.Length; i++)
        {
            out2Buffer.AddRow();
            out2Buffer.pkey = Row.pkey;
            out2Buffer.moneycode = int.Parse(result[i].ToString());
            out2Buffer.gamemoney = int.Parse(result[i + 1].ToString());
            i++;
        }
    }

    public override void CreateNewOutputRows()
    {
        /*
          Add rows by calling the AddRow method on the member variable named "<Output Name>Buffer".
          For example, call MyOutputBuffer.AddRow() if your output was named "MyOutput".
        */
    }

}

out2 蟆郁骸 #

02.png


C# 覲豌襴 企蟆..
Dts.Variables["覲"].Value = "覲螳企?"; 
-- 伎 2011-12-22 10:01:44
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

螻旧 蟆螻 覃 語螻 豺蟲 覦蟆 覲旧 り. (企企 觚襭誤)