oracle

no statement parsed and wrong number or types of arguments - cfstoredproc

I have an Oracle procedure - editBacklog which I'm calling from a CFM page via cfstoredproc. After several changes to the procedure I started getting ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'EDITBACKLOG'. I've gotten this before and found that if I changed the name of the procedure it start...

Determining an Oracle SQL MERGE statement result

Follow up to this question This (similar version from old link) works in SQL Server 2008, however, Oracle is giving me trouble: MERGE INTO wdm_test USING ( select '10000000000000000000000000000000' Guid from DUAL ) val ON ( wdm_test.Guid = val.Guid ) WHEN MATCHED THEN UPDATE SET test_column = null WHEN NOT MATCHED THEN INSERT (Guid, ...

Extract time part from TimeStamp column in ORACLE

Actually i' am using MyTimeStampField-TRUNC(MyTimeStampField) to extract the time part from an timestamp column in Oracle. SELECT CURRENT_TIMESTAMP-TRUNC(CURRENT_TIMESTAMP) FROM DUAL this return +00 13:12:07.100729 this work ok for me, to extract the time part from an timestamp field, but i' m wondering if exist a better way (m...

When would isSearchable return false for an Oracle JDBC column?

In what cases would a call to java.sql.ResultSetMetaData.isSearchable(int col) return false for an Oracle database? The documentation for the method doesn't really answer the question: "Indicates whether the designated column can be used in a where clause." I can think of only one case - when the column is the result of an aggregate...

Can I return values to PHP from an anonymous PL/SQL block?

I'm using PHP and OCI8 to execute anonymous Oracle PL/SQL blocks of code. Is there any way for me to bind a variable and get its output upon completion of the block, just as I can when I call stored procedures in a similar way? $SQL = "declare something varchar2 := 'I want this returned'; begin --How can I return the value of 'someth...

How do I check whether the table has a record with a primary key values?

I have a exception to prevent inserting same records on my oracle. If a record having spcific Key value already exists, record insertion interface has to be enabled. I've heard that COUNT(*) has lots of cost which I don't want to use. Is there any alternative way to make it at least cost? ...

One blank line in list item

Hi there. I try to write a code to fill my list item in oracle form builder. I do it by write a function to handle this. list_index number(10) := 1; clear_list(list_item1); FOR I IN (Select id,desc FORM table1) LOOP ADD_LIST_ELEMENT('list_item1',list_index,desc,id); list_index := list_index + 1; END LOOP list_item1 := get_list_el...

Does Oracle re-hash the driving table for each join on the same table columns?

Say you've got the following query on 9i: SELECT /*+ USE_HASH(t2 t3) */ * FROM table1 t1 -- this has lots of rows LEFT JOIN table2 t2 ON t1.col1 = t2.col1 AND t1.col2 = t2.col2 LEFT JOIN table3 t3 ON t1.col1 = t3.col1 AND t1.col2 = t3.col2 Due to 9i not having RIGHT OUTER HASH JOIN, it needs to hash table1 for both joins. D...

Anyone know how to open new page in another window using OAF other then LOV

Anyone know how to open new page in another window using OAF - Oracle application framework other then LOV. I tried with JavaScript but due to security reasons i can not use it. just wondering if there is a way in OAF to achieve this. Thanks Imran ...

Excel Spreadsheet - Best way to perform an Oracle Query on a cell

Hi there, I have an Excel Spreadsheeet. There is a cell containing a concatenated name and surname (don't ask why), for example: Cell A2 BLOGGSJOE On this cell, I would like to run the following SQL and output it to cell A3, A4 and A5 SELECT i.id, i.forename, i.surname FROM individual i WHERE UPPER(REPLACE('" & A2 & "', ' ', '')) =...

which data type i must choose for boolean type field??

Hi I wanna create a Boolean field in my oracle table but I seen there is no boolean or byte data type so,which one of the oracle data type I must choose for a boolean value? answer: I find how Oracle developer do this by wisard: CREATE TABLE TABLE17 ( COLUMN1 CHAR(1 BYTE) NOT NULL, COLUMN2 VARCHAR2(4000) ) ; ...

Can the arguments BUFFER and DIRECT be used with expdp

I have a strange case where in what this guy says is not happening with me. I am not able to set the above two parameters neither through command line directly, nor using a par file. expdp -help doesn't show any such arguments, so are there analogous arguments to BUFFER and DIRECT (from exp) in the data-pump version. ...

Sql Trigger Trouble

Hey guys i cant get this trigger to work, ive worked on it for an hour or so and cant see to figure out where im going wrong, any help would be appreciated CREATE OR REPLACE TRIGGER allergy BEFORE INSERT ON DECLARE med VARCHAR2(20); BEGIN SELECT v.medication RCD.specify INTO med FROM visit v, relcondetails RCD WHERE ...

Oracle, slow performance when using sub select

I have a view that is very slow if you fetch all rows. But if I select a subset (providing an ID in the where clause) the performance is very good. I cannot hardcode the ID so I create a sub select to get the ID from another table. The sub select only returns one ID. Now the performance is very slow and it seems like Oracle is evaluating...

Where can I download Oracle 9i Personal Edition for Linux (or Windows 7)

Where can I download Oracle 9i Personal Edition for Linux (or Windows 7)? Is it still available anywhere? Oracle's website keeps redirecting to later editions. ...

What's the most auditable way to organize database maintenance scripting/scheduling?

I'm using PHP, Oracle and crontab. Crontab is invoking a php script, which is going to synchronize some data between a local and remote database. First I thought about putting this all in one large, anonymous inline PL/SQL block and executing it in PHP. The problem is that without creating a table to audit the procedure it's really op...

seemingly complex date time calculations...

I have this function that should convert them from Ole to UTC8601 standard, but I don't understand how the integer representations of time seem to work. Can anyone give me some explanation? the function is called: RipOf_AfxTmFromOleDate containing statements as: nDaysAbsolute %= 146097L; Where does the value come from and how is it c...

Oracle Minus query. How can I get a result with NULLS if the top SQL and the bottom SQL don't contain NULLs?

How could this SQL... CREATE TABLE NewTable AS SELECT A,B,C FROM Table1 minus SELECT A, B, C From Table2 ...create a new table with NULL values in column A when neither Table1 or Table2 had NULL values for in column A? But on the other hand, this SQL... SELECT * FROM ( SELECT A,B,C FROM Table1 minus SELECT A, ...

Why is PHP's OCI8/Oracle oci_bind_array_by_name not working for me?

I'm trying to bind a php variable to pl/sql array. The pl/sql procedure works fine when I execute it manually and set the bind, so I know that's not the problem. It's the oci_bind_array_by_name that is causing problems. I get the following error message for the line in the PHP code below where I call the oci_bind_array_by_name functio...

How do I create a Database Link where remote and local are the same server

I have a need to create a database link that is a link to a schema on the same server. Is there a special keyword to use for this? ( like local or localhost ) I am not entirely sure what the name of the server is in tnsnames and that may be part of my problem. This is for a complicated situation which involves a script that needs a da...