SSIS条件性拆分平面文件行[关闭](SSIS Conditional Split flat file rows [closed])
我想添加一个SSIS包,根据每一行将包含多行的平面文件拆分为多个文件。
该文件包含如下数据:
TH | 166777 | 20130930110716 | 2 |至此1 |客户支持| 002 |曼彻斯特| -99.00 | -82.50 | -16.50 | 0.00 | 0.00 | 0.00 | -99.00 | 0.00 | 0.00 | 0.00 |直到|出售| 9 | 2- 1007-9999 ||秃头|嘉|女士| 客户|阿什比路|拉夫堡|莱斯特郡| LE11 3NG | GBR | 01509 232200 |||||||||||||||||| TO | 4SA671:MULTI:10 | 5252525000026 | Andrea衬衫|颜色:多色/彩色:多件装/尺码:10。/ | 1 | 0.00 | -82.50 |
110.00 | -99.00 | 0.00 | 20.00 | 1 | 0.00 |退款|不适用|| WTOP || 0 | 0 | 0.00 || 0.00 | 486 | 1666 | 485 || GOOD Goodwill TT |卡| -99.00 | GBP | |签证信用||| TF | 3 | 1
I'm looking to add an SSIS package to split a flat file with multiple rows to multiple files based on each row.
The file contains the data like this:
TH|166777|20130930110716|2|Till 1|Customer Support|002|Manchester|-99.00|-82.50|-16.50|0.00|0.00|0.00|-99.00|0.00|0.00|0.00|till|sold|9|2-1007-9999||Balding|Claire|Ms| Customer |Ashby Road|Loughborough|Leicestershire|LE11 3NG|GBR|01509 232200|||||||||||||||||| TO|4SA671:MULTI:10|5252525000026|Andrea Shirt|COLOUR: Multi / COLOUR: Multi-pack / SIZE: 10. / |1|0.00|-82.50|
110.00|-99.00|0.00|20.00|1|0.00|refund|n/a||WTOP||0|0|0.00||0.00|486|1666|485||GOOD Goodwill TT|card|-99.00|GBP||Visa Credit ||| TF|3|1
原文:https://stackoverflow.com/questions/35895150
最满意答案
这就是我提出的那种“黑客”解决方案。 它有效,但我很想知道是否有更好的方法。
renderSettingsShowsList: function ( data ) { $("#showChooser") .empty() .append('<div role="heading" class="ui-controlgroup-label"><h3>Which show are you attending?</h3></div><div class="ui-controlgroup-controls"></div>'); $("#shows-list").tmpl( data ).appendTo("#showChooser .ui-controlgroup-controls"); //assign click handler to new form controls to do everything we need it to $('#showChooser input:radio').click(function(e) { //mark all as not selected $("#showChooser input:radio").prop('checked', false); $("#showChooser label") .attr('data-theme','c') .removeClass('ui-btn-up-e') .addClass('ui-radio-off') .removeClass('ui-radio-on') .find(".ui-icon") .addClass('ui-icon-radio-off') .removeClass('ui-icon-shadow') .removeClass('ui-icon-radio-on'); //style selected option var radio = $(this), label = radio.next(); radio.prop('checked', true); label.attr('data-theme','e') .addClass('ui-btn-up-e') .removeClass('ui-radio-off') .addClass('ui-radio-on') .find(".ui-icon") .removeClass('ui-icon-radio-off') .addClass('ui-icon-shadow') .addClass('ui-icon-radio-on'); }); }
This is the sort of "hack" solution I've come up with. It works, but I'd love to know if there's a better way.
renderSettingsShowsList: function ( data ) { $("#showChooser") .empty() .append('<div role="heading" class="ui-controlgroup-label"><h3>Which show are you attending?</h3></div><div class="ui-controlgroup-controls"></div>'); $("#shows-list").tmpl( data ).appendTo("#showChooser .ui-controlgroup-controls"); //assign click handler to new form controls to do everything we need it to $('#showChooser input:radio').click(function(e) { //mark all as not selected $("#showChooser input:radio").prop('checked', false); $("#showChooser label") .attr('data-theme','c') .removeClass('ui-btn-up-e') .addClass('ui-radio-off') .removeClass('ui-radio-on') .find(".ui-icon") .addClass('ui-icon-radio-off') .removeClass('ui-icon-shadow') .removeClass('ui-icon-radio-on'); //style selected option var radio = $(this), label = radio.next(); radio.prop('checked', true); label.attr('data-theme','e') .addClass('ui-btn-up-e') .removeClass('ui-radio-off') .addClass('ui-radio-on') .find(".ui-icon") .removeClass('ui-icon-radio-off') .addClass('ui-icon-shadow') .addClass('ui-icon-radio-on'); }); }
相关问答
更多-
使用这种形式的.on() (根据下面的评论)。 $(document).on("click", '[id^=updateVersionItem]', function(event, ui) { console.log("updateVersion, selected = " + $(this).attr('id')); }) 示例: http : //jsfiddle.net/saluce/YaAEJ/ 否则,无论何时动态添加新元素,都需要将click事件附加到这些项目。 假设以下代码: ...
-
您可以使用.change为您想要的 $("input[@name='lom']").change(function(){ // Do something interesting here }); 截至jQuery 1.3 你不再需要'@'。 正确的选择方法是: $("input[name='lom']") You can use .change for what you want $("input[@name='lom']").change(function(){ // Do somet ...
-
jQuery移动单选按钮(jQuery mobile radio buttons)[2023-10-24]
我终于使用了omar的解决方案$('span.ui-icon').remove(); 。 但它看起来并不正确。 这只是一个解决方法。 I finally used omar's solution $('span.ui-icon').remove();. But it doesn't look right. This is just a work around. -
在jquery mobile中动态更改单选按钮高度和字体大小(dynamically change radio button height and font size in jquery mobile)[2022-04-03]
jQM通过替换其标记来增强单选按钮,但是,它将原始输入标记保留在dom下,在新标记下垂直居中于无线电div中。 将高度设置为100px时,增强按钮保持在顶部,而输入移动到中间并变为可见。 这有两个选项: 不要调整按钮的大小,只需更改字体大小,让按钮自动调整字体大小: DEMO 如果需要将按钮大小更改为精确高度,可以使用CSS隐藏输入: .ui-radio input{ display: none; } DEMO jQM enhances the radio button by replacing ... -
由于jQuery Mobile创建了新的按钮样式,因此必须将click事件绑定到假设为按钮的span元素。 必须为Fieldset提供id或任何其他标识符,我们将使用它来访问按钮元素。 Click事件无法绑定到原始无线电元素,因为它们具有活动的css属性display:none; 这是一个有效的例子: http : //jsfiddle.net/Gajotres/dCEnC/ $(document).on('pagebeforeshow', '#index', function(){ ...
-
即使已经检查过jQuery移动单选按钮更改事件也始终触发(jQuery mobile radio button changed event always fires even if already checked)[2022-04-05]
jQuery Mobile实际上用标签dom元素替换了无线电输入,并为这些标签添加了点击处理程序,然后在底层单选按钮上触发更改事件。 您可以为每个单选按钮添加值属性: