0

I am working in Oracle to SQL Server Migration using SSMA tool. In oracle we have DML operations like insert and delete implemented in a function, when the code is migrated to SQL server these DML operations are not implemented in SQL server.

Do I need install any supporting packages in order to accomplish it?

I googled and did some investigation but couldn't get any better solution. I tried converting this function to procedure it worked but the problem is these procedures cannot be called by any select queries and all

MT0
  • 143,790
  • 11
  • 59
  • 117

1 Answers1

2

In SQL Server you are not allowed to perform Create/Update/Delete operations in functions. If you need, you can create STORED PROCEDURE. But the stored procedure itself, cannot be used in SELECT statements (joins, apply). So, if you need to used it results in a JOIN for example, you can INSERT its results in table, but there are limitations there, too.

gotqn
  • 42,737
  • 46
  • 157
  • 243