Forum Moderators: coopster

Message Too Old, No Replies

Mixing database sql queries

         

fintan

2:54 pm on Apr 7, 2005 (gmt 0)

10+ Year Member



Hi I was wondering has anyone mixed database queries before say one for mysql another for access and another for oracle.
Thanks

fintan.

jatar_k

6:28 pm on Apr 7, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I don't think I have but I have used multiple connections to various mysql databases. I don't see any reason it would be any different. The key was always making sure I had the proper connection in my queries.

ironik

10:09 pm on Apr 7, 2005 (gmt 0)

10+ Year Member



As long as you have a solution to convert database specific SQL then you shouldn't have a problem (the LIMIT clause only applies to specific databases and I don't think Oracle or Access support it).

Be aware that some databases also handle UPDATE and INSERT queries a little differently, and Oracle has some stuff that is specific to itself.

I use Adodb (database abstraction layer) so I can use wrappers to create queries I'm fairly certain will run on many different database types. It also allows me to import an XML Schema for which I can direct specific queries to specific database types when building a database (standard SQL dump may not, or will not, work between databases)

fintan

11:59 pm on Apr 7, 2005 (gmt 0)

10+ Year Member



I'm in the process of doing a migration from asp to php. I have access database's that have to stay in access until they can be setup in oracle. It's a mixed environment Linux/Windows.

What I was thinking of doing was running a sql query against an access database using the odbtp extension.

Then putting the result in an array or something. Then running a oracle query instead of doing a join. Replace it with the array. Does that make sense. Can it be done. I've tried the adodb layer with some success but not something I'd rely on.