Question: I have a SSIS project that queries a database and get item level data.

The data should be exported to two flat files, one being a summary file,
and the second one a details file. Both files are linked using a index (string) 
column that is generated during the SSIS dataflow.

Now i basically want a "distinct index" of the detail data for the summary file.
It is however not a plain aggregate, some columns are strings and instead of a count
I want something like "first(fieldname)" (like in SSRS).

Any suggestions how to do this? 

Thanks!

Answer: 
Some things to consider:

* Don't use "span10" and "row" classes, but instead apply this in your CSS
* Use helpers, even if you don't plan on reusing them (at the moment), it cleans up your code

This gives you something like:

```
<div class="content">
  <%= simple_form_for(@user) do |f| %>
    <%= membership_input_field %>
  <% end %>
</div>

```

SCSS:

```
.content {
  @extend .row;
  #users_form {
    @extend .span10;
    @extend .form-horizontal;
  }
}

```

I can't test this right now, but you should get the general idea. Much cleaner, and much less useless classes to style your HTML.
For long or complex ERB expansions, I often go multiline like so:

```
<div>
  <div>
    <%=
      some_call_with_lots_of_args_or_a_block(
        arg1,
        arg2
      ) do
        block_stuff()
      end
    %>
  </div>
</div>

```

Lots of lines, but the indents now all "make sense" for a given value of "sense". HTH!