Databases and files should be treated entirely differently.
QVD's can only be exported using a script in a QlikView document. Always start by loading a QVD in its entirety in memory. Then, depending on the required output format, do one of these:
Files: use a STORE statement to store data into a csv file. All data processing should be performed before using the STORE statement.
Databases: CONNECT to your RDBMS and use SQL UPDATE/SQL INSERT statements to transfer the memory-resident data to DB Tables. Do not forget to put the connection in ReadWrite mode (see "Open Database in ReadWrite mode" in the Settings tab in the Script Editor)