MohitPandit
asked on
.NET application to support Oracle & SQL Server
Hello Folks,
I need to build a .NET Application. Initially, it will support to Oracle and later with SQL Server.
So, once migrate with Oracle to SQL Server for data and db schema. It will be done by migration tool.
But, how about CRUD operation, which should common for Oracle and SQL Server?
Should I use plain sql and run time judge with SQL Server & Oracle client OR maintain two entity model?
Do you have any thoughts & suggestions?
Best Regards,
Mohit Sharma
I need to build a .NET Application. Initially, it will support to Oracle and later with SQL Server.
So, once migrate with Oracle to SQL Server for data and db schema. It will be done by migration tool.
But, how about CRUD operation, which should common for Oracle and SQL Server?
Should I use plain sql and run time judge with SQL Server & Oracle client OR maintain two entity model?
Do you have any thoughts & suggestions?
Best Regards,
Mohit Sharma
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Example-
This will not work in Oracle but works really well in SQL Server.
This will not work in Oracle but works really well in SQL Server.
Update x
SET x.c1 = y.c1
FROM table1 x
INNER JOIN table2 y ON x.a = y.a
Well, that's not ANSI-SQL. In my comment I told that if the author uses ANSI-SQL it won't have issues.
For your example the following will work on both Oracle and SQL Server:
EDIT: Code updated
For your example the following will work on both Oracle and SQL Server:
UPDATE table1
SET c1 = (SELECT y.c1
FROM table2 y
WHERE table1.a = y.a);
EDIT: Code updated
Yes thats what. The one one is so used to SQL Server syntax will face issues like me :)
ASKER
Thanks for your comments & suggestions. I'll get back.
ASKER
Thanks