I have a Table1 below in SQL. 

```
ID | Provider | AdviserName   | PolicyNumber |
---|----------|---------------|--------------|
1  | Asgard   | John Smith    | A1           |
2  | Asgard   | Andrew Bailey | A2           |
3  | BT       | Tony Saw      | B1           |
4  | BT       | Greg Lee      | B2           |
5  | BT       | Jenny Main    | B3           |
6  | Zurich   | Beth Bond     | Z1           |
7  | Zurich   | Fang Li       | Z2           |
8  | Zurich   | Garry Low     | Z3           |

```

I need to export this table to .CSV (Microsoft Excel) and split between each provider.

Agard.csv

```
ID | Provider | AdviserName   | PolicyNumber |
---|----------|---------------|--------------|
1  | Asgard   | John Smith    | A1           |
2  | Asgard   | Andrew Bailey | A2           |

```

BT.csv

```
ID | Provider | AdviserName   | PolicyNumber |
---|----------|---------------|--------------|
3  | BT       | Tony Saw      | B1           |
4  | BT       | Greg Lee      | B2           |
5  | BT       | Jenny Main    | B3           |

```

Zurich.csv

```
ID | Provider | AdviserName   | PolicyNumber |
---|----------|---------------|--------------|
6  | Zurich   | Beth Bond     | Z1           |
7  | Zurich   | Fang Li       | Z2           |
8  | Zurich   | Garry Low     | Z3           |

```

I have tried using Foreach Loop Container, however it doesn't distinguish between provider. (btw, I have more than 50 providers to be split into different .csv files).

I'm using SQL Server 2012. Thanks for the help.