See these discussions:
In Load script: Re: Can we insert QVW data into a database table ?
In Macro code: Insert / Update data into MSSQL
INSERT/UPDATE in QVDs: Insert and Replace in QVD
With Dynamic Update: Re: How to use Dynamic update action in QV 11
The community contains tips for almost every situation, so I'm not going to repeat them here. Use the Search box at the top right to find a solution that fits your requirements.