db2 function DIGITS on HIVE - hive

I'm migrating some querys from db2 to hive and i've come upon one that uses the function DIGITS.
Is there a similar function on hive?

Related

Migrate table from Oracle to SQL Server

Migrate a table from Oracle to SQL Server.
I have used Toad to export (select * from table) into a pipe delimited .txt file so it can be used to be consumed in SQL Server. Now the Oracle table has a DATE column and the output from Toad for that column is (2/26/2016 3.05.10.000000 PM). This format is not being compatible for the datetime column in SQL Server side.
I feel we can convert the date in Oracle to a compatible SQL Server format for easier ingestion.
Please help me understand the conversion both from Oracle to a compatible SQL Server format.
Create Oracle Linked server in SQL Server with ODBC connection. and use that Linked server to play with Oracle and SQL Server tables using SQL Server.
You must understand that DATE datatypes are binary data. Using to_date() on a column that is already a DATE is inappropriate. It forces oracle to perform (behind the scenes) a to_char() on the DATE column in order to produce character data that is the required input to to_date(). Then, when you see (in your text csv file) that it has produced a "date" in some particular format, it is because oracle has then had to run the result of your to_date() back through to_char(), using the default NLS_DATE_FORMAT setting to produce a character string for the text output.
So your solution is this:
First, determine what text format of a date MSSQL wants when it uses this csv file. I don't know what that is, but for the sake of argument, let's say it is 'yyyy-mm-dd'. With that information, construct your SELECT in oracle like this:
select mycol1,
to_char(my_date_col,'yyyy-mm-dd'),
mycol2
from my_table;
That said, I agree with the others, why bother with this cumbersome process in the first place? Or even some other intermediary like SSIS? Why not just create a shared server in MSSQL and query the oracle table directly? Or create a database link in the Oracle DB and, using the oracle transparent gateway as the conduit, INSERT directly into the MSSQL table from Oracle? Either the linked server or the database link will be much faster than any external process.
I would suggest a best way to transfer Oracle table to SQL Serveris by using SSIS package.
You can have a Source as Oracle and your conversion issue can be fixed by Data
Conversion task and your Destination can be SQL Server.

How use sql in Teradata with Aster database?

Currenly I use Teradata Studio, and I want to use table in Aster, it's possible to create dblinks or other configuration to call tables from Aster database to Teradata database into Teradata Studio?.
Thanks.
In Aster you will be having a SQL-MR function name load_to_teradata you can use it to load tables from aster to teradatadb

Access cross-platform schema Report Builder

I'm working on some reports and we're halfway through migrating from Oracle to SQL Server.
The reports I'm migrating are using some user-defined functions from the Oracle schema so the rest of my new translated code obviously does not work with them.
Within Report Builder 3.0 I have access to the data source, how can I provide access to the schema so the functions still work?
I'm sorry if that isn't very clear.
I would try to build a dataset pointed at the Oracle schema that calls the user-defined functions and returns their results, together with the input parameter column(s). This dataset will need to return a row for every required combination of input parameter column(s).
Then in textbox expressions, I would use the SSRS Lookup function to return the function results from the Oracle dataset.

How to insert LONG BINARY from SQL Server to Oracle

I need to get a copy of a SQL Server 2008 table into an Oracle RDBMS. I have database link for SQL Server, database has a table which contains LONG BINARY type column.
When I issue
create table test_ora as select * from mssqltable#dblink
I get the error
Can't convert LONG
I tried to use to_lob, to_char, hextoraw and a ream of Oracle conversion function but still hasn't defeated the issue. Do you have any ideas?
p.s. I'm out of work now so can't tell exact ORA- error number.
There is a way to do that with undocumented Oracle's package:
http://tonguc.wordpress.com/2008/08/28/how-to-transfer-long-datatype-over-dblink/
I would recommend tool called Pentaho Data Integration. This is free, small and superb ETL tool.
Download page: community(.)pentaho(.)com
It will recreated all tables and types for you. How to do it:
pldwh(.)blogspot(.)co(.)uk/2013/03/pentaho-data-integration-create-tables_1(.)html

HSQL function useful for datamasking

Does anybody know how to perform data masking using existing functions (similar to random function in oracle) in HSQL db.