is there any function for translating data in sql - sql

I want to convert the data in one of my columns to another language ... is there any function in sql for translating it?

No, there are no SQL functions/procedures for translating between languages built into the Oracle database.
Oracle Text has features for multi-language indexes; but that is for indexing documents and not for translating them.
Oracle 12c and later also has features for translating between different SQL dialects; but that is not for translating data.
If you want to translate data then you will need 3rd party solution that you can import into the database or external software that you can call from the database.

Related

Convert German Text into English using Oracle SQL [duplicate]

I want to convert the data in one of my columns to another language ... is there any function in sql for translating it?
No, there are no SQL functions/procedures for translating between languages built into the Oracle database.
Oracle Text has features for multi-language indexes; but that is for indexing documents and not for translating them.
Oracle 12c and later also has features for translating between different SQL dialects; but that is not for translating data.
If you want to translate data then you will need 3rd party solution that you can import into the database or external software that you can call from the database.

Execute Informix DDL script on Oracle

If I have an Informix DDL script for a database and I want to run this script on Oracle to create the equivalent database with the same structure, indexes, data types and constraints.
What are the steps I should follow to execute the script successfully and what are the factors I should take into consideration during the execution?
I use Informix server version IBM Informix Dynamic Server Version 12.10.FC3.
I use Informix Client SDK version 3.50.
I use Oracle 11g.
It is a non-trivial proposition, in general, to transfer even just DDL between Informix and Oracle. There are numerous detailed differences in the syntax, even if you don't use some of the more exotic types (e.g. user-defined types, or lists or sets or row types). This is written from an Informix perspective; treat statements about Oracle with a mild pinch of salt.
Oracle uses VARCHAR2; Informix doesn't (but some types that Informix use should not be translated to Oracle's VARCHAR — it should be VARCHAR2).
Oracle has one underlying numeric type; Informix has many. However, Oracle recognizes most of the type names.
Oracle's DATE type includes a time component; Informix's does not.
Informix has esoteric types such as DATETIME MONTH TO MINUTE (the canonical odd-ball example) which don't have a ready equivalent in Oracle.
You'll need to scrutinize BYTE, TEXT, BLOB and CLOB types carefully and translate accordingly.
There are probably differences in the limits on some of the types. These may cause issues in translation.
There are nitpicking differences between Informix and the rest of the world in the naming of constraints (Informix puts the constraint name after the constraint; the standard puts the constraint name before it).
…and no doubt many other problems…
There are tools available to assist with migrations from Oracle to Informix. I assume there are tools available to assist with the reverse migration, but I am not familiar with them.
Have a look at the official resources for Informix to Oracle at
http://www.oracle.com/technetwork/database/migration/informix-085032.html

Hana Column Store dialect to Oracle 12c SQL

While trying to benchmark Oracle's Database Inmemory, we were looking for publicly available benchmarking data set and tools. The CH-benCHmark suited our requirement exactly, but it has HANA Column Store Dialect as part of the source files.
So, our requirement is to convert these HANA Column Store dialect SQLs to Oracle 12c SQLs. Google search returned the conversion from Oracle to Hana dialect not the reverse.
Has anyone came across this requirement? Is there a simple/direct way to do the conversion?
Any pointers will be much helpful.
Yes I have done this exercise! there's no direct way from HANA Dialect to Oracle Dialect, But you can make use of ORACLE_LOADER and it's semantics to effectively create Oracle Dialect! Only problem you may face would be the flow, where HANA's flow is totally different from Oracle's schema creation flow.
For example:
you can easily use LOAD FROM FILE... syntax in HANA, But you need an externally organized table in case of Oracle.

Convert sql server script syntax to oracle script syntax

I have an application that is supposed to support two types of databases SQL SERVER and ORACLE. So we've been working forever on SQL Server and now we are making this support.
My idea was to create a tool to generate the scripts of creating the database using CMO then convert those scripts to PL/SQL Oracle scripts and run them on Oracle.
My questions are:
Is this syntax conversion possible in code?
I need a guideline to make this kind of syntax conversion.
Do you have a better suggestion to maintain two types of databases (i mean when making a change of one of them, we dont have to make it to the other. we need a tool to make that change.)?
If you write using standard sql it should be mostly portable. Eg use fetch instead of top, SET #a=.. instead of Select #a=.. Use Merge for updates instead of join updates, CURRENT_TIMESTAMP instead of getdate() etc.

Moving from Oracle SQL to ANSI SQL pros and cons

I work in a project where the UI has direct access to the database through SQL code. The company has a framework where we create UI pages in xml and after that it is parsed and creates FLEX pages. If we want some data from the DB (Oracle) we add a sql query in the xml (instead of databinding with a datacontext object like we could do with WPF). If we want to add some logic, there is no code behind, we call store procedures. After we have the data we need the parser does the job.
The new requirements are to use the framework and create a new product that will be compatible with SQL Server and the thoughts are to start transforming the (Oracle)SQL queries to ANSI SQL.
Can somebody tell me the benefits and mainly the problems that we are going to face doing that?
Do you think there is a better way?
Note: The framework is really big and there are a lot of products built on that so managers are not keen to just throw it away(I tried but.. :))
Each dialect of SQL is different. You could use ANSI SQL but a) not all of ANSI SQL is implemented by most DBMS and b) most DBMS's have implementation-specific optimisations which will perform better for some cases.
So I'd say, don't go for ANSI SQL. It won't always work and sometimes it will work slower than taking advantage of a vendor's non-standard implementations.
Specifically, Oracle requires a StoredProcedure to return a REF_CURSOR from a stored procedure to fill a DataSet. SQL Server doesnt; the SP returns what the sp SELECTed. You're going to have to change your SP's to get rid of the returned REF_CURSOR.
Date handling is quite different: Oracle needs a to_date to turn a string into a date in where clauses etc; SQL Server just takes the string and converts it for you. And so on and so on. (I'm not at all sure what the ANSI Standard is, or even if it covers this!) To avoid changing your SQL you could add create SQL Server function called to_date, but this is now going to slow up your SQL.
If you have much PL/SQL in stored procedures, you have a big job converting it to T-SQL. They are quite different.
Good luck!