Built-in Function To Covert CURSOR To VARCHAR?

Feb 13, 2007

know if there's a built-in function to covert an Oracle CURSOR to VARCHAR? Or how about a XMLType to VARCHAR?

View 1 Replies


ADVERTISEMENT

Application Express :: Is There A Built-in Substitution String For Item With Cursor Focus

Jun 27, 2012

I was wondering if there is a substitution string ( or something else) that could be used to 'return' the name of a Form item that has cursor focus?

View 3 Replies View Related

Any Built-in Function (HOST) In Oracle

May 30, 2012

saw in one procedure using host function in below manner.

v_status:= host(v_cmd);

But i searched for the host function it is not available.

My question is --Is there any pre defined built-in function "host" in oracle 10g.

View 1 Replies View Related

Covert A Time Shown As 001200 (12 Hours) To 720 Minutes

Feb 10, 2012

I am trying to covert a time shown as 001200 (12 hours) to 720 mins. I have tried the following but get errors when executing:

(MTTD)>=TO_DATE('000000','HH24:MI:SS').

I have also tried .

MTTD = to_date('000000','HH24:MI:SS') =trunc(sysdate,'MM')*24*60; and neither is working.

What am I doing incorrectly?

View 1 Replies View Related

SQL & PL/SQL :: Use Cursor As Parameter For Function?

May 4, 2011

I was wondering if it's possible to use the cursor as a parameter for a function. Something like this is what I'm trying to do:

set serverouput on
declare
cursor csv_file

[Code]....

View 34 Replies View Related

SQL & PL/SQL :: How To Use Ref Cursor In A Package Or In A Function

Sep 20, 2012

what is ref cursor?

How to use ref cursor in a package or in a function?

View 7 Replies View Related

SQL & PL/SQL :: Passing Cursor To Function

May 6, 2010

I am strugling hard to pass a cursor to my function as in parameter.here is my code

Function migrate_audits (sys_audit_ids SYS_REFCURSOR ) return number;
Function migrate_audits (sys_audit_ids in sys_refcursor ) return number
is
v_return number;
v_sys_audit_id number;
begin
LOOP FETCH sys_audit_ids INTO v_sys_audit_id;
[code]....

passing cursor to a function is not possible in oracle? what other option I have to pass collection to the function ?

View 14 Replies View Related

SQL & PL/SQL :: Cursor With Parameter Inside Function

Mar 7, 2010

I have code inside function
.....
cursor cur1 is
select *
from sarchkler
where sarchkler_appl_no = in_appl_no
begin
select max(saradap_appl_no) into in_appl_no from saradap;
for rec1 in cur1 loop
......
my question I get variable for cursor after cursor declaration

View 7 Replies View Related

SQL & PL/SQL :: Can Use Temp Table In Function Which Uses Ref Cursor

Dec 6, 2012

example to use temp table in function with only ref cursor.

I need to use for the reporting purpose.

View 1 Replies View Related

SQL & PL/SQL :: How To Handle Ref Cursor Returned From Another Function

Dec 16, 2011

declare
type osd_refone is ref cursor;
osd_ref osd_refone;
l_status number;
[code]......

abc_reports in this pack "ab_report" it is the function it having the ref cursor as out parameter . when am executing the above anonymous block am getting the below error,so how can i print the out ref cursor data in my block.

ERROR at line 8:
ORA-06550: line 8, column 12:
PLS-00221: 'OSD_REF' is not a procedure or is undefined
ORA-06550: line 8, column 3:
PL/SQL: Statement ignored

View 6 Replies View Related

Windows :: Returning REF Cursor From PL/SQL Function?

Apr 5, 2011

I've seen several code samples that show how to return a REFCURSOR from a Stored Function, but when I try it with C# it gives me allways WRONG NUMBER OF ARGUMENTS or somehing like that.

I presently don't have my code in here, but it is something like this:

cmd.Parameters.add ("parRefCursor", dbresult.RefCursor, direction.Result);

I'm being able to use it as a OUT parameter, but I would like to have it as a RETURN value from a Function.

View 4 Replies View Related

SQL & PL/SQL :: Using Function Inside Query And Without Cursor?

Mar 17, 2013

To display highest marks,least marks,average marks,total marks of the student name entered.

desc stud;
Name Null? Type
----------------------------------------- -------- ----------------------------
SID NUMBER
NAME VARCHAR2(20)
M1 NUMBER
M2 NUMBER

How do I do that using PL/SQL and without Cursor.

View 4 Replies View Related

SQL & PL/SQL :: Return Ref Cursor To Temporary Table From Function

Feb 17, 2011

I have strange problem when i try to return a ref cursor holding data from a select on a oracle global temporary table. If i iterate through the cursor , i can see the values but the function as such returns nothing through the ref cursor. I tried the temporary table as both delete on commit and preserve on commit

create or replace
PACKAGE BODY BILL AS

FUNCTION FILTERI RETURN BILL.refcursor IS
testcursor BILL.refcursor;

ttstatus INT;
iSuccess INT;
returns INT;
TruncatedSQL1 VARCHAR2(32767);
BEGIN
[code].........

View 12 Replies View Related

Forms :: Two Cursor Record Block - Decode Function

Sep 16, 2010

I have Two cursor record block..which is attached in form..

My TASK IS

In my first Block, When DBCR Column = 'D' Then in backend this column value should be save as a '1'
WHEN DBCR Column = 'C' Then Then in backend this column value should be save as a '2'

My Both Field is on Data Block...

In Property palette of this field can we write any decode condition..so it reflects directly on database.

View 2 Replies View Related

Standard Configuration That Uses Built-in Apache

Jul 1, 2010

This error occurs while trying to print a report in a PDF format using Oracle Application Express 3.0. I'm not sure what this means and how to fix it. I'm running Oracle 10g on Windows Vista.

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1186
ORA-12570: TNS: packet reader failure

This is the first time I'm attempting to print to a PDF. I did follow configuration according to the Oracle documentation. I selected the Standard configuration that uses the built-in Apache FOP or another standard XSL-FO processing engine.

View 6 Replies View Related

Forms :: How To Use Duplicate Record Built In

Jun 19, 2012

I have one form in which there are master detail blocks. I am entering one record in master block and corresponding entry in detail block. If again I am entering a new record in master block, of course the corresponding entry is getting erased since the block is getting changed.

After entering the data in master block I want to pop a message as 'whether you want to duplicate the same entry in detail block '. If yes, then how can I copy the same details which i have entered for previous record? Can I use duplicate_record built in? If yes, How?

View 1 Replies View Related

Forms :: Post Built-in Commits Changes In The Database?

May 7, 2010

I have been testing out a form using 10.1.2.0.2 on a v10.2.0.1 db and in my local env. the form works correctly i.e. if I make a change and 'post' it and then exit and press NO (when asked to save changes) then it correctly leaves the value in the database as it originally was.

The process works by the user pressing a button in form A (read only form) and this opens form B (using open_mode,session,activate) and the user makes their change(s) in form B (a 'post' command is issued in a When New Rec Inst trigger on a db block when the user navigates to a new record within the same block if it is determined that the block status <> 'QUERY') before returning to form A and pressing 'NO' when prompted to save changes.

However, if I run the same process in the TEST env. using the same executable against the same database then it actually updates the database value.

I have tested this by adding a debug message at the end of form B to retrieve the db value back AFTER having issued a clear_form(no_commit) just for the sake of the test and it still returns me the 'new' i.e. amended value - which is obviously incorrect. From what I can see it would appear that the commit occurs straight after the 'post' has been issued and well before the user even exits the form.

Is this a known bug with the 'post' built-in or could it be that a parameter is set to act in this way (i.e. is there an 'autocommit' setting that is 'ON') within the application server?

View 8 Replies View Related

Forms :: Anyway To Speed Up Performance Of Go_record Built It

Mar 4, 2010

Is there anyway to speed up the performance of the go_record built it or is there an alternative way to do it.

I have a table with nearly 30,000 rows and I would like to implement a text field that will allow the user to jump to a specified record. The only problem is if they try to jump too far away it will take a long time to load (beginning to end of 30,000 takes over a minute).

This problem doesn't arise if all the records, or up to the one they are jumping to, have been fetched already, but even if I fetch all records at the beginning it will still take a long time to initially load them.

View 10 Replies View Related

Forms :: FRM-40733 - PL/SQL Built-in DBMS_ERROR_CODE Failed

May 28, 2011

I have a client who is facing the above error. Everything used to work perfectly but since a week, he gets this error message on a specific FORM. No updates have been made to the FORM.

The FMXs are stored on the database server(10G R3, Windows 2003 R2) and the Client terminals access them through a network drive.When executing the conflicting FORM on the server, no error.

I call the DBMS_ERROR_CODE routine from a FORM-LEVEL ON-ERROR trigger :

DECLARE
ERR NUMBER;
BEGIN
IF DBMS_ERROR_CODE=-1 THEN
MSG('Client existant',ERR,'E');
ELSE

[code]....

Code for procedure MSG :

PROCEDURE MSG(TXT_MSG IN VARCHAR2 , RET_REP OUT NUMBER , TYPE_MSG IN CHAR DEFAULT 'I' ,
LABEL_BUT1 IN VARCHAR2 DEFAULT 'OK' , LABEL_BUT2 IN VARCHAR2 DEFAULT NULL ,
LABEL_BUT3 IN VARCHAR2 DEFAULT NULL) IS
VL_ALERT ALERT;
BEGIN

[code]....

View 6 Replies View Related

Getting Query Rewrite Using MV's Built From Remote Tables?

Nov 19, 2012

Is it possible to have query rewrite using MV's built from remote tables?

11.20.2

View 1 Replies View Related

Forms :: Test Legacy Apps Built Using Reports 6i On Windows 7?

Jul 21, 2012

I still have a legacy apps built using Forms 6i and Reports 6i running against Oracle 10g database on a Windows XP client and Windows 2008 server.It seems working well on Windows 7 client (32-bit only), but I think that it needs to test this apps.

View 11 Replies View Related

Forms :: How To Built Form (oracle 6i) That Connect With Report Builder

Feb 16, 2013

How i can to built form (oracle 6i) that connect with report builder ?

View 2 Replies View Related

Forms :: How To Hide Oracle In-built Message Which Appears At Bottom Of Window

Mar 18, 2011

How to hide oracle in-built message which appears at the bottom of the window(just above the task-bar) to the left side.

View 2 Replies View Related

SQL & PL/SQL :: Compare Varchar With Date

Feb 26, 2012

I have one command compare varchar type with date type by Pl/SQL.

date_entry gave values:" 2012/01/06 22:28:24",

now i want to convert it to date and compare with sysdate.

Select * From qvsystem
Where to_char(to_date(date_entry, 'rrrr-mm-dd hh24:mi:ss'), 'dd-mm-rrrr') = to_char(Sysdate, 'dd-mm-rrrr');
----
note:date_en2012/01/06 22:28:24

after I executed that command It's appear one message .

View 7 Replies View Related

SQL & PL/SQL :: Convert Long To Varchar

Aug 30, 2012

display or get values stored in a long column.i tried the below code, but myvar is shown as null. am i missing something here or is there a better apporoach than this ?. There are actually 16 rows returned for this query but with empty values for 'high_value' column which is critical for me. How can i do this long to varchar convertion ?

SET SERVEROUTPUT ON
DECLARE
my_var long;
BEGIN
for x in ( SELECT high_value
FROM all_tab_partitions
WHERE table_name = 'SALES_DISCOUNT'
AND table_owner = 'CED12'
ORDER BY partition_position DESC )
[code]....

View 4 Replies View Related

SQL & PL/SQL :: Creation Of Sequence To Varchar

Dec 7, 2011

how to create sequence to varchar and how see that sequence

View 2 Replies View Related

SQL & PL/SQL :: Getting Highest Value From Varchar Column

Feb 12, 2011

I've a large table on which I applying aggregate and group by functions to the the results.

Here are two of the columns in my table:

Name ==== Score
John ==== 200*
Zohaib ==== 299
Ali ==== 0*
John ==== 200
Maria ==== 150*
Ali ==== 0
Maria ==== absent
John ==== absent

Here astrick (*) means with distinction....

The "score" column is a varchar column I want to run a query on this table to show the highest score for each student and the output should be like this:

Name ==== Score
Zohaib ==== 299
John ==== 200*
Maria ==== 150*
Ali ==== 0*

Important note:

1. if there is a tie between two highest scores like for a student, incase of john 200 was made twice, but the score with asterick (*) will be the "maximum" becuase it is with distinction so the output should also show the the highest score with asterick.

2. the output should show the the 2nd column (score) in desc order of highest score by each student...again incase of a tie, the one with astrick will come first in the result..

I know with just mere numbers, that is pretty easy but in this case it is a varchar column and also i need the astrick along with the highest score.

I want the simplest and shortest query if possible to achieve this result

I hope I've been able to clearly explain my requirment. I am using 10G.

View 1 Replies View Related

SQL & PL/SQL :: Difference Between Varchar And Varchar2?

Aug 31, 2012

What is the exact difference between varchar and varchar2?

As i know only the length is the one difference.Apart from this length,what are all the differences?

View 3 Replies View Related

SQL & PL/SQL :: Storing Unicode In Varchar

Feb 3, 2011

I have a varchar field in a table. When I store the following string, some undefined character is storing.

String to be stored: Test String
String actually stored: Test ¿ string

Please note that here '' is not Hyphen. It is a special character that msword has. when you copy this and paste in a word document you find the difference.

I have listed the character set for CHAR and NCHAR from NLS_DATABASE_PARAMETERS

NLS_CHARACTERSET - WE8ISO8859P1
NLS_NCHAR_CHARACTERSET - AL16UTF16

View 12 Replies View Related

SQL & PL/SQL :: Inherit From Varchar 2 / Number

Mar 22, 2012

I see you can build an address object consisting of street name and number, city and so on, and use this in CREATE TABLE, so all tables use the same fields for addresses. And moreover you can add check functions to prevent street numbers to be negative for instance in the constructor. You can even use inheritance. I like that.

However, all teaching on this subject I found on the Internet starts with structs (points consisting of x and y, persons consisting of name and address, etc.). Then they go to inheritance and show how to build an employee who is just a person plus an employee number. They never start with simple types.

What I would like to do would be rather to start with basic types such as number or varchar2 and inherit from them. An EAN is a VARCHAR2 holding only digits where the last digit is a check sum that must be matched. An item number may be a VARCHAR2 matching 'NNN-AAAA'. A simple string may be a VARCHAR2 where no functional characters such as carriage return, etc. occur.

I would then write my create table statement thus:

CREATE TABLE item (itemno T_ITEMNO, ean T_EAN, itemname T_SIMPLESTRING); and inserts like INSERT INTO item values('123--BCD', '1234567890abc', 'toy') would fail with exceptions like 'item numbers must be formatted NNN-AAAA' or '1234567890abc is not a valid EAN'.

However this seems not possible:

create or replace type T_EAN under varchar2
(
constructor function T_EAN(p_string in varchar2) return self as result
);

fails with "PLS-00580: supertype must be an object type".

Rather than creating completely new types, I would start with extending existing types, but this seems not possible. Is that really impossible or am I using the wrong approach?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved