Export data to SQL format