I have a doveadm
command output separated by tabs, which looks like this:
Username Quota name Type Value Limit %
user2@example2.com User quota STORAGE 203032 1024000 19
some@example.com User quota MESSAGE 816 - 0
other@ex.com User quota STORAGE 116873 1024000 11
email@ex.com User quota MESSAGE 235 - 0
How can I transporm each line to SQL query like this?
INSERT INTO quota (username, quota, type, value, limit, percentage) VALUES ('user2@example2.com', 'User quota', 'STORAGE', 203032, 1024000, 19);
...