i have a Data in SSMS and i want to export them to multiple Excel sheet using two columns in the table as the tabs in excel.
Example of My Source data looks like this:
LoanID State TYPE STEP
2 CA R6 1
3 CA R6 3
4 CA P1 4
67 CA P1 5
45 CA R2 7
23 CA R2 8
Now i want my excel file (Destination) to have multiple tabs using column 'State' and 'Type'.
below is how i want my result is excel should be :
first tab should be 'CA-R6'
LoanID State TYPE STEP
2 CA R6 1
3 CA R6 3
Second tab should be 'CA-P1'
LoanID State TYPE STEP
4 CA P1 4
67 CA P1 5
And the Third tab will be 'CA-R2'
LoanID State TYPE STEP
45 CA R2 7
23 CA R2 8