new solution for sql export