I have an application where the identity column is stored as an Oracle VARCHAR2(50 BYTE) but is actually a Guid. I want my model to expose it as a Guid:
class Foo
{
public Guid Id { get; set; }
}
Using Fluent NHibernate I don't see a CustomTypeIs() method on the IIdentityPart. I would think it would be something similar to an I...
UPDATE (5/21/2010) SUCCESS!
So after MUCH $head->desk()'ing, I've solved it.
Remember kids, be wary of the instant client version you use, dependent on the virtualization settings!
I had been installing the generic Instant Client (not aware our ESX servers sit on AMD processors, not Intel) and that worked fine internally (the CentOS i...
my ($ret) = $l_dbh->selectrow_array("select dummy from "
. $l_dbh->quote_identifier($dblink, 'SYSIBM', "SYSDUMMY1") );
$ret;
};
...
I'm trying to query a table, fetch all records, and save the result as a CSV file.
This is what I've done so far:
require 'OCI8'
conn = OCI8.new('scott','tiger','020')
file = File.open('output.csv','w') do |f|
conn.exec('select * from emp') do |e|
f.write log.join(',')
end
end
.. And while it does generate a CSV file, the proble...
I'm designing multiple process to query job from database.
Each job wake up once per minute to query task and send to workflow system.
I need advice about which best way to mask record and query it and not duplicate with other process.
...
Hi,
This is my query,
CREATE VIEW employee_vu AS(
SELECT employee_id,last_name "employee",department_id
FROM employees);
I am giving alias of columns in lower case ,and in it is stored in lower case
after doing desc i have confirmed.
But when i am trying to select this column employee :error occurs
EMPLOYEE: invalid identi...
You can also write hibernate hql or criteria queries.
I have Teacher entity and Student entity like this :
class Teacher {
public Long id ;
public Set<Student> students;
}
class Student {
public Long id ;
public Teacher teacher ;
public Boolean passedSemester1;
public Boolean passedSemester2;
}
You can ...
I want to automate the periodic backup and restore of the Oracle 10g Database.Please, someone help me immediately.
and please note that I want the task to be performed from the command line scripts.
...
Hi,
I'm using Oracle 9.2x to do some xmltype data manipulation.
The table as simple as tabls(xml sys.xmltype), with like 10000 rows stored. Now I use a cursor to loop every row, then doing like
table.xml.extract('//.../text()','...').getStringVal();
I notice the oracle instance and the uga/pga keep allocating memory per execution of...
I am not able to make this out: Between eliminates use of >= and <=
...but when i tried this query:
SELECT *
FROM names
WHERE name >= 'Ankit'
AND name <= 'P'
...it gives output:
name
------
Ankit
Mac
Bob
When I tried:
SELECT *
FROM names
WHERE name BETWEEN 'Ankit' AND 'P'
...it gives output:
name
------
Ankit...
I have a schema like :
employees (eno, ename, zip, hdate)
customers (cno, cnmae, street, zip, phone)
zipcodes (zip, city)
where zip is pk in zipcodes and fk in other tables.
I have to write an update query which updates all the occurence of zipcode 4994 to 1234 throughout the database.
update zipcodes,customers,employees
...
Greeting People,
I'm trying to retrieve records from table by knowing the date in column contains date and time.
Suppose I have table called t1 which contains only two column name and date respectively.
The data stored in column date like this 8/3/2010 12:34:20 PM.
I want to retrieve this record by this query for example (note I don'...
I have two Oracle questions.
How can I set the primary key of a table when the table is made up of an object type? e.g.
CREATE TABLE object_names OF object_type
I have created a Varray type,
CREATE TYPE MULTI_TAG AS VARRAY(10) OF VARCHAR(10);
but when I try to do
SELECT p.tags.count FROM pg_photos p;
I get an inv...
I have an SQL statement where I would like to get data of 1200 ep_codes by making use of IN clause. When I include more than 1000 ep_codes inside IN clause, Oracle says I'm not allowed to do that. To overcome this, I tried to change the SQL code as follows:
SELECT period, ...
FROM my_view
WHERE period = '200912'
...
AND...
Hi everyone,
i am trying to install oracle webcenter and some of its compnents like wls_portlet and wls_spaces, in order to deploy and test my portlet in Oracle environment.
i have first installed Oracle Weblogic Server. Then installed necessary repositories for those webcenter components through RCU.
finally i installed webcenter, and e...
Hi,
is there any way in Oracle, to get only the dd-mm-yyyy part from an unix timestamp in oracle?
Like:
select to_char(my_timestamp, 'ddmmyyyy') as my_new_timestamp from table
...
I wanted to see what some suggested approaches would be to validate a field that is stored as a CSV against a table containing appropriate values. Althought it would be desired, it is NOT an option to split the CSV list into another related table. In the example data below I would be trying to capture the code 99 for widget A.
Below i...
As my understanding on setting hibernate, I need to create
table meta data file (person.hbm.xml), include all the fields mapping
java object (person.java)
If we use stored procedures for all transaction, do we still need the above configuration?
It seems hibernate and stored procedures will overlap,
We set up the stored procedur...
What is the best way to create an Archive of image documents in the database ?
Given we have about 2-10 million records and each record includes 2-4 images and about 20 text fields , what is the best way for create this archive so that we have good speed and high security for data?
Also, what database is good for this project?
...
This problem happens in
Oracle 11.1.07 with win 2008 32 bit, Tomcat 5.5 JDBC version 11.2 JDK 1.5_015
When I try to execute a search this error appear
1.0.0-SNAPSHOT-SNAPSHOT nonfatal store error> kodo.jdo.DataStoreException:
No more data to read from socket {prepstmnt 6358855 SELECT t0.JDOID, t0.typ
, t0.V ..... (long) 12157...