PL/SQL library to emulate mysql built-in functions - mysql

I need to convert the queries of a MySql-only project to Oracle.
Is there a PL/SQL library that emulates the MySql built-in functions?
Thanks in advance.

I don't know of any library like you're asking for, there are some tools that might help you though. I found this site that tells you the equivalent functions and data types between the two DBMS, and it looks like they have a free online tool you could run your project through which might be the best option if it's not too big.

Related

Adding MySQL functionality in LabView

I am new to LabVIEW and trying to make a small project. In LabVIEW from one device, I am measuring some values and then need to store them in database. Initially, I used Excel to store data. But now I need to add MySQL functionality to store data and then later retrieve when need for analyzing.
I look for NI toolkit but it is expensive. I need some free and open source solution for my project.
I search over SO and google to find any examples where I can start and make it work, but I couldn't find any.
If someone suggest me some resources or having some example code that I can use to achieve my goal. thanks in advance.
Take a look at LabSQL. This works in LabVIEW 2017, allowing connection to a MySQL database without NI's LabVIEW Database Connectivity Toolkit.
I normally use the Database Connectivity Toolkit, but I did confirm I could get this to work in 2017 as well (though connecting to a MSSQL database instead of MySQL).
The only thing that tripped me up at first was not using the Create Connection before Open Connection (because I was used to the aforementioned toolkit). I didn't try anything complicated; I just ran a simple selection query. But it looks like everything should work pretty similarly to the toolkit. As adambro said, if you have a more specific question, maybe we can help with an answer.
I would suggest you could use SQLite. It is a fairly easy toolkit. You can download it via the VI package manager. By dr. James Powell. SQLite is excellent in storing data locally.
Use the SQLite browser from sqlitebrowser.org.
Also a nice way to learn SQL!

Comparing data from two SQL Server databases using build-in tools?

Can I compare the data from two SQL Server 2008 RT databases using built-in tools in SQL Management Studio or do I need to look for some third-party tool to do this?
I've used "the Google" but only seem to get information about third-party tools.
Thanks.
Use Except operator or checksum like i explain in this post.
Just note that the CheckSum method can provide duplicates.
If your database is big, you may want to look into SQL Data Compare.
If you need very sophisticated comparisons you can use Open Source DiffKit:
www.diffkit.org
You can use SQL Server Data Tools. For the most part they work pretty well but they don't have many features and tend to show some limitations on complex tasks.
Third party tools like xSQL Data Compare give you a huge amount of control over the comparison and synchronization process, so I suggest you take a look at those as well.
Dislcaimer: I'm affiliated to xSQL

Possible to write MySQL stored procedures in ruby?

I have heard that one in PostgreSQL could write stored procedures in ruby (also python/java/c++).
Is this possible in MySQL?
Because I dont want to learn their own language for it.
Thanks
No, you can't. Just install PostgreSQL on your (virtual) system and install PL/Ruby as well:
http://moulon.inra.fr/ruby/plruby.html
Setting up a virtual machine (in VMware or Virtual Box) using Ubuntu with PostgreSQL, takes just a few minutes:
https://help.ubuntu.com/10.04/serverguide/C/postgresql.html
Simply put - nope. In MySQL you have to write a SP in their language or a UDF in C/C++. I brought up a C/C++ UDF, but I don't believe you can even really do a stored procedure in them.
They don't support different languages via a pluggable system like PostgreSQL.

Need a tool to convert postgres database to mysql

I found the mysql migration toolkit which will migrate the tables.But is there something which will convert the functions as well.
Almost certainly not.
If your functions are in the SQL language only, it should probably be doable. But any of the many other languages supported by PostgreSQL (pl/pgsql, perl, python etc) are completely different, and contain much functionality that's simply not supported on MySQL.
most likely not. the stored procedure and function language differs greatly between postgresql and mysql. such an application would be costly to develop.
There are several data migration tools available on Google to convert database. I use dbload for example.

PL/Ruby equivalent in MySQL

PL/Ruby is a loadable procedural language for Postgres that lets you use Ruby to write user defined functions for the database.
Anyone know of an equivalent way of writing user defined functions for MySQL in Ruby?
Starting from version 5 (I think) Mysql supports stored procedures, but the syntax is restricted to SQL:2003 which is somewhat similar to PL/SQL.
Other languages aren't supported and I'm not aware of any projects offering ruby support. Last time I checked the PL/Ruby extensions to postgres were still a bit wonky as well, though.
Mysql as far as I am aware only supports MySQLs own stored procedure language.
I'm a postgresql fan too, and this is something that has always frustrated me about MySQL when I have had no choice but to use it. :(