oracle

Good way to deal with comma seperated values in oracle

I am getting passed comma seperated values to a stored procedure in oracle. I want to treat these values as a table so that I can use them in a query like: select * from tabl_a where column_b in (<csv values passed in>) What is the best way to do this in 11g? Right now we are looping through these one by one and inserting them into ...

Is JPA expertise transferable to Toplink?

How similar are JPA and Toplink such that expertise in one could carry over to the other? ...

comma separated values in oracle function body

I've got following oracle function but it does not work and errors out. I used Ask Tom's way to convert comma separated values to be used in select * from table1 where col1 in <> declared in package header: TYPE myTableType IS table of varchar2 (255); Part of package body: l_string long default iv_value_with_comma_separated|...

Oracle Connection exception via JDBC

I have installed Oracle 11gR2 on my machine, now when i try to connect to it using IP address as 'localhost' or '127.0.0.1' there is no issue, but when I use ip address of machine '192.168.1.6' it throws exception: Io exception: Then Network Adapter could not establish the connection. I have installed ms loopback adapter prior to instal...

AUTONOMOUS_TRANSACTION: pros and cons

Can be autonomous transactions dangerous? If yes, in which situations? When autonomous transactions are necessary? ...

PHP connecting Oracle and mySQL

I' trying to get some data from Oracle via ODBC to mySQL database. And then Insert some lines in mySQL database. I manage to list the lines from ORACLE but fail to Insert into mySQL. $time_start = microtime(true); set_time_limit(10000); //ligação ODBC ORACLE $connect = odbc_connect("acatex32", "acatex", "acatex"); $query = "select b...

set transaction must be first statement of transaction With Spring.Data.NHibernate12

Hi , I am using Spring.Data.NHibernate12 on my database level.my application connection with database is not getting released.Sometime in Nhibernate log i am getting set transaction must be first statement of transaction .Setting transaction tag on top of the function. Underneath given is Dataconfiguration.xml <?xml version="1.0" ...

how to store BigInteger values in oracle database.

I have connected Java program to Oracle database using JDBC. I want to store BigInteger values(512 bits) in the database. What should be the type of the column? I m trying like this: I have taken a column of number type in the database. I converted BigInteger to BigDecimal like this: BigInteger b=new BigInteger("577985757095780257907...

How to escape <, >, and & characters to html entities in Oracle PL/SQL

Hi, I need to send HTML emails directly from oracle PL/SQL package. This works almost fine. I have problem with the fact that some of the data fetched from a table contain things like <S>, <L>, and similar fragments, which sometimes ar treated as HTML tags, and even if not, they are always ignored and never displayed. So, I need to e...

Hibernate MapKeyManyToMany gives composite key where none exists

I have a Hibernate (3.3.1) mapping of a map using a three-way join table: @Entity public class SiteConfiguration extends ConfigurationSet { @ManyToMany @MapKeyManyToMany(joinColumns=@JoinColumn(name="SiteTypeInstallationId")) @JoinTable( name="SiteConfig_InstConfig", joinColumns = @JoinColumn(name="SiteConfigId"), inve...

I can't create a view in oracle database using sqlplus (insufficient privileges)

I'm running this SQL: CREATE VIEW showMembersInfo(MemberID,Fname,Lname,Address,DOB,Telephone,NIC,Email,WorkplaceID,WorkName,WorkAddress,WorkTelephone,StartingDate,ExpiryDate,Amount,WitnessID,WitName,WitAddress,WitNIC,WitEmail,WitTelephone) AS SELECT mem.MemberID,mem.FirstName,mem.LastName,mem.Address,mem.DOB,mem.Telephone,mem.NIC,mem.E...

how to use found_rows in oracle package to avoid two queries

I made a package which I can use like this: select * from table(my_package.my_function(99, 'something, something2', 1, 50)) I make use of the package in a stored procedure. Sample stored procedure looks like: insert into something values(...) from (select * from table(my_package.my_function(99, 'something, something2', 1, 50))) a o...

Is it appropriate to raise exceptions in stored procedures that wrap around CRUD operations, when the number of rows affected != 1?

This is a pretty specific question, albeit possibly subjective, but I've been using this pattern very frequently while not seeing others use it very often. Am I missing out on something or being too paranoid? I wrap all my UPDATE,DELETE,INSERT operations in stored procedures, and only give EXECUTE on my package and SELECT on my tables,...

Microsoft ODBC for Oracle and JDBC

Is the Microsoft ODBC driver for Oracle compatible with JDBC? If so, could an example be given? ...

Oracle Cursor and JDBC ODBC

I have some procedures to execute in the database that has an OUT REFCURSOR parameter. When I am connecting with the JDBC thin client, everything works fine. However, if I were to change the connection string to refer to the ODBC data source pointing to the same database, those procedures will fail. The procedures that do not use an OUT...

Access to a oracle Database

I have created a database in Oracle. Say "TEMP" is the name of the database created. I have created a user DWH. Now I would like to grant access to TEMP for the user DWH. How shall i do? ...

Oracle Blob as img src in PHP page

I have a site that currently uses images on a file server. The images appear on a page where the user can drag and drop each as is needed. This is done with jQuery and the images are enclosed in a list. Each image is pretty standard: <img src='//network_path/image.png' height='80px'> Now however I need to reference images stored as a ...

PLS-00103: Encountered the symbol "end-of-file" in simple update block

Hello, The following Oracle statement: DECLARE ID NUMBER; BEGIN UPDATE myusername.terrainMap SET playerID = :playerID,tileLayout = :tileLayout WHERE ID = :ID END; Gives me the following error: ORA-06550: line 6, column 15: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 3, column 19: PL/SQL: SQL Statemen...

SQL Server and Oracle Extended/External Procedures Compatibility

Is a extended/external stored procedure written in C and currently working under SQL Server viable to work under Oracle as well? ...

Is there a way to give a subquery an alias in Oracle 11g SQL?

Is there a way to give a subquery in Oracle 11g an alias like: select * from (select client_ref_id, request from some_table where message_type = 1) abc, (select client_ref_id, response from some_table where message_type = 2) defg where abc.client_ref_id = def.client_ref_id; Otherwise is there a way to join the two subque...