I have an Oracle Table with columns of type Float and I am using Ruby on Rails to retrieve data from that table. Data for float columns can be saved in Oracle with no problem but when retrieving, the data are coming as nil. I am using 'activerecord-oracle_enhanced-adapter' version 1.6.7 to connect to Oracle.
Issue was solved by oracle-enhanced contributors.
issue:
https://github.com/rsim/oracle-enhanced/issues/1244
solution:
https://github.com/rsim/oracle-enhanced/pull/1254
Related
I have columns like a int, b varchar,c timestamp in my table x (redshift) and am trying to load those three columns into another table b(redshift) by using a mapping m1, in that am using odbc connection's.
Issue is am able to load the data for all the columns except date fields (c timestamp) whether those are from src or expression.
In place of date null values are storing.
Mapping ran successful without any issue/warning.
Note: am using odbc connection's because I need to call stored procedure in Post sql.
thanks for your response.
As I modified the lookup transformation then I resolved the issue.
In lookup mapping I just modified the multiple matches to return all rows then the date fields are getting loaded from source/expression transformation to target.
I am using DB2 9.7 (LUW) in a windows server, in which multiple DBs are available in a single DB instance. I just found that in one of these DBs, I am unable to add a column with DATE data type, during table creation or altering. The column been added is getting changed to timestamp instead.
Any help on this will be welcome.
Check out your Oracle Compatibility setting
Depending on that setting a date is interpreted as Timestamp(0) like in your example.
Because these settings take effect if the database has been created after setting the DB2_COMPATIBILITY_VECTOR registry variable your database can show a different behaviour.
I have a strange issue. The lonlat column on my app works well on the development server –– its output is in the form of POINT(X Y). But when I move the data to the production server, the output is strange!
ActionView::Template::Error (undefined method `lon' for "0101000020E6100000541B9C887E7A52C02920ED7F80614440":String):
The lonlat value, which is encoded with SRID: 4326, is being read as a string. I am almost certain that there was a corruption in the data during migrating it from development to production because this was not a problem before the migration.
Does anyone know what about the database schema or column may cause this issue?
A geometry field stores its data as WKB. To see the WKT representation you need to change your query to something like
select ST_Astext(the_geom) as geometry from table
However, I don't know why in your development you have some kind of implicit conversion between WKB binary data and WKT strings. ¿What version of postgres and postgis are you using?
What lang is in your app server?
Is that ActiveRecord you're using?
I suggest you try something like
float ST_X(geometry a_point);
To make sure you can read the data properly and determinate if problem is on the data field or somewhere else.
I also would try doing the pg_dump in a single step if you determinate the problem is with the geometry column.
You can use pg_dump with option
--exclude-table-data=reg_expresion_ _tablename_
--exclude-table-data=schema.reg_expresion_ _tablename_
This will bring all the schema definition, but exclude the table data and bring only the data from table you need.
Turns out that when I killed the connection to the server to migrate the data, Rails did not set the schema search path (meaning didn't discover the postgis extension) upon reconnecting. I had to restart the server to solve this problem.
I am using EnterpriseDB 9.2 advanced server (an Oracle compatible PostgreSQL fork) and I want to read data from a clob or text type data type column using getClob() method.
I'm getting error when trying:
org.postgresql.util.PSQLException: Bad value for type long :
adminuser#domainUser Logged In
Sucessfully at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.toLong(AbstractJdbc2ResultSet.java:2971)
at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getLong(AbstractJdbc2ResultSet.java:2163)
at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getClob(AbstractJdbc2ResultSet.java:436)
So is it possible to read data from above mentioned scenario using any technique in postgresql?
In a case of using Hibernate you can define the entity as shown below. The solution works well at least on PostgreSQL, H2 and HSQLDB (I didn't check other DBs):
#Column(columnDefinition = "CLOB")
String myClobField;
I am working on Oracle10g, And I am currently facing one issue regarding NCLOB column.
Application uses Silverlight, WCF, NHibernate and oracle10g database.
Application firing one select query, in that query, it contains XML data for NCLOB column and it is giving me the following error:
"inserted value too large for column".
Can anyone please help me to solve this issue?
Thanks in advance,
Mahesh