First thing you need to do is create an external content type that maps over your SQL table. The table needs to have the userid and the managerid as one row. So if the raw tables dont have that info, you should create a SQL view that does the join.
- Open your site in sharepoint designer
- Select external content type from the side navigation
- Select new external content type from the ribbon
- Follow the screens
Then you need to get that info into your user profiles
- Go to central admin
- Go to your user profile service application
- Select Configure Synchronization Connections
- Select Create new connection
- From the type, select Business Data Connectivity
- Choose the external content type from part 1
- Its going to be a 1:1 mapping with the userid as the mapping property
Then you need to map the manager field from the external content type to the user profile manager property
- Go back to user profile service application
- Go to Manage User Properties
- Find the manager field
- Scroll to the bottom and add a new mapping, using the connection and external content type from part 1 and 2
- Do a full profile sync
Now you need to define your workflow
- Open your list in sharepoint designer
- Create an approval workflow
- Define a workflow property 'manager', that looks up the profile field 'manager' of the target user
- Define a approval workflow, that has a participant of the workflow property 'manager'