how to format oracle.sql.TIMESTAMP#64b6887 - oracle

We are using timestamp datatype in oracle 10g. in database data
coming properly but in the app the timestamp will come like oracle.sql.TIMESTAMP#31c2bcfc.
{"isSuccessful":true,"resultSet":[{"PAN_NUMBER":"befpd9907G","NATIONALITY":"Indian","GUARDIAN_NAME":"guard1","THIRD_APPLICANT":"Third","MOTHER_MAIDEN_NAME":"Mother","ACCOUNT_TYPE":"AccType","MARITAL_STATUS":"Mststus","STATE":"state","CARD_TYPE":"def","MINOR":"no","EDUCATION":"double","LAST_NAME":"last","SSN_NUMBER":"ssn34","FIRST_NAME":"first","PIN_CODE":"5600","EXPIRY_DATE":"oracle.sql.TIMESTAMP#7a628b9a","AADHAR_NUMBER":"123456789012","COUNTRY":"coun","ANNUAL_INCOME":4.25,"PREFERRED_NAME":"prefered","CATEGORY":"Gen","SECOND_APPLICANT":"Second","GENDER":"gender","APPLICATION_FORM_DATE":"oracle.sql.TIMESTAMP#31c2bcfc"}]}
Where did i do a mistake?

Related

Query JSONB through dblink (Oracle <> Postgres)

We have a local db (Oracle) where we want to query a remote db (postgres), the data to be retreived is in JSONB format.
What is the best way for achieving this ?
The tool for accessing PostgreSQL from Oracle database is GoldenGate.
The 12.2 documentation does not even list the jsonb data type, so it is probably is not supported (I guess Oracle didn't check PostgreSQL's documentation since 9.2, when json was introduced).
But then Oracle doesn't have a special JSON data type anyway, it stores JSON as VARCHAR2 or CLOB, so you can easily use a view in PostgreSQL that casts the jsonb to text and use that.

converting sybase datetime format to oracle timestamp

I am getting bellow datetime format from sybase DB
2015-08-12T11:49:50.196+01:00
and i need to insert this value into oracle database column of type TIMESTAMP(6).
i am not able to specify the correct format to insert the above datetime in to Timestamp column in oracle.
can any one help me in this.
thanks in advance.
Are you sure that you don't want to store time zone information (thus type TIMESTAMP(6) WITH TIME ZONE)?
CREATE TABLE timestamp (value TIMESTAMP(6));
INSERT INTO timestamp VALUES (TO_TIMESTAMP_TZ('2015-08-12T11:49:50.196+01:00', 'YYYY-MM-DD"T"HH24:MI:SS.FF3 TZH:TZM'));

Date datatype in SQL Server gets changed to nvarchar datatype in informatica

I am importing a SQL Server table into Informatica as a source. One of the column's datatype in the SQL Server table is DATE.
When I import it, its showing up as nvarchar in Informatica.
Can someone help me understand this?
Can you please provide more details? Here's a quick test I've done:
I've created a sample table on SQL Server 11 with date, datetime and smalldatetime columns:
Imported it as Source to Informatica 9.5.1:
As you can see, all looks pretty good. Let me know what can I do to replicate the issue. Or simply alter the imported source to reflect the table structure.
I have a table (in SQL Server DB ) with columns defined as 'date'. When I imported, they converted to 'nvarchar (10)'. however, I have another column defined as 'datetime', which imported as datetime properly.
Looks there is an issue with 'date' defined column.
This can also be because of a particular driver you are using to import the table. I haven't tried it any time with SQL Server however have seen this issue with Oracle table imports.
To solve this problem I have to import the table through "DataDirect 7.1 SQL Server Wire Protocol"

java timestamp with timezone to store in ORACLE DB

I need to insert Timestamp with Timezone in Oracle DB using java JDBC. I have a timestamp in one variable and need to append Timezone, like Europe/Paris, to my timestamp and store it in the DB which has a column of datatype Timestamp with Timezone.
How can I achieve that?

How to read NCLOB, CLOB data values from Oracle database using Classic ASP pages?

I am getting the following error:
Microsoft OLE DB Provider for Oracle: Data type is not supported.
Could somebody help me figure out this please...
Situation:
Recently migrated database from SQL Server 2005 to Oracle 11g. One of the table has some columns of the data type ntext in SQL Server, which were converted to NCLOB during migration to Oracle. Client is Classic ASP page (VBScript) accessing the Oracle Database through OLEDB connection.
When the execution reaches the query (Select query) that reads the column of type NCLOB it is throwing the Microsoft OLE DB Provider for Oracle: Data type is not supported error. When I take out that particular column then the query is running fine...
QUESTION: How to read NCLOB, CLOB data values from Classic ASP pages?
Plz let me know if you need more information.....
Thank You..
I know that Microsoft's ODBC Driver for Oracle didn't support any of the LOB types-- I would wager that its OLE DB Provider didn't either given the error. Can you upgrade to the Oracle OLE DB Provider?
As an aside, since you are migrating from SQL Server to Oracle, do you really need to use the NCLOB data type? Since Oracle allows the database character set to be Unicode, you normally don't need (and don't want) to use the NVARCHAR2 or NCLOB data types unless you're stuck supporting an old database that requires a non-Unicode character set. For data that is English or Western Eurpoean in nature, storing data in a CLOB has substantial benefits in terms of storage space since the CLOB would store the data in UTF-8 rather than UTF-16 in an NCLOB (assuming that you picked a Unicode character set for the database). Eliminating the NVARCHAR2 and NCLOB columns also tends to make it much easier for front-end tools to handle the data.

Resources