edited create_view method (for sql server)