PL/SQL :: Trim Extra Space In Function Parameter List
May 9, 2013
I am calling a function in front end, from front end i am passing space, now i want to trim space in parameter itself, it's psssible, assume the below is the function defination, i want to trim the p_region_name parameter like this trim(p_region_name), is this possible?
FUNCTION add_country_region_column (
p_s_country_code_iso_2 IN varchar2_table_type,
p_type IN d_country.c1_type%TYPE,
p_name IN d_country.c1_name%TYPE,
p_desc IN d_country.c1_desc%TYPE,
[Code]....
View 3 Replies
ADVERTISEMENT
Dec 19, 2012
Why cant oracle give an extra parameter for summary function like MAX and MIN...For example
select max(salary,2)
from empWill give the second max salary.
View 11 Replies
View Related
Nov 7, 2010
I do below alter command
alter tablespace RCA_MB_IDX add datafile '/gxsdb/database/oradata5/RCA/RCA_REF_MB_IDX_01.dbf ' size 1024M
But there is extra space in the file location '/gxsdb/database/oradata5/RCA/RCA_REF_MB_IDX_01.dbfX'
I mark X for that space ...
The command is commit .
But there is problem when do backup .
View 2 Replies
View Related
Nov 7, 2010
I do below alter command alter tablespace RCA_MB_IDX add datafile '/gxsdb/database oradata5/RCA/RCA_REF_MB_IDX_01.dbf ' size 1024M
But there is extra space in the file location '/gxsdb/database/oradata5 RCA/RCA_REF_MB_IDX_01.dbfX' I mark X for that space ...
The command is commit .
But there is problem when do backup ...as the file cannot be find since there is extra space after ".dbf" How can I fall back ?
View 4 Replies
View Related
Feb 28, 2010
I have one issue while loading the value through sql*loader the last column data is SG1 and when its loaded , it is length of this columns is showing 4 char. Unable to understand, how to find this extra space. Though used TRIM but does not work.
View 8 Replies
View Related
Jun 26, 2012
I have the below SQL with cust_id is indexed
DELETE FROM ALERT WHERE TRIM(CUST_CD)=TRIM('100350378');
Output of the plan table is
OBJECT_NAME OPTION COST
ALERT 1866
ALERT BY INDEX ROWID 1866
DELETE FROM ALERT WHERE CUST_CD=TRIM('100350378');
Output of the plan table is
OBJECT_NAME OPTION COST
ALERT 3
ALERT BY INDEX ROWID 3
how to use trim on indexed column.
View 1 Replies
View Related
Jun 22, 2011
I have created a function based index(FBI) with trim(header_date), but when i query the table by passing the hardcoded date, it is not working and i have to manually apply trim to get the result?
my query after applying FBI is
select * from abc where header_date = '21-JUN-11', no results are returned and when i apply trim to header_date it works fine .
View 4 Replies
View Related
Jul 1, 2013
A computation after submit pl/sql function process to trim off the first part of the string (CQ..) within the list manager values. Support for example the list manager contains values such as
CQ..SAMPLE1..TEST1CQ..SAMPLE2..TEST2CQ..SAMPLE1..TEST2
The computation process should trim off the first part(CQ..) and should return the list manager value as SAMPLE1..TEST1SAMPLE2..TEST2SAMPLE1..TEST2 Oracle APEX 4.0.2 is the version and Oracle 10g r2 is the database.
View 7 Replies
View Related
Feb 22, 2011
Is there any possibilites to remove the symbol '*' only from LEFT or RIGHT side, instead BOTH the side.
select '>' || trim (both '*' from '***removing stars at both sides***') || '<' "Stars removed" from dual;
View 4 Replies
View Related
Dec 2, 2010
I have some question about the parameter RESUMABLE 10G. My quesition is suppose if i am running a expdp process and if there is no space left on the file system the export fails. So in this case if we set the RESUMABLE parameter in the DB will it be useful to resume the expdp from where it fails or it will useful if we schedule a job for the export.
View 2 Replies
View Related
Sep 18, 2012
I need to get multiple code values and put it into a variable which later need to pass into the where clause of an sql. But i am not getting any results even i pass those values in the variable of an where clause: below is my Procedure:
declare
TYPE crMain_record is RECORD (
v_code dummy.v_code%type,
n_no dummy.n_no%type,
[Code].....
END;"lv_character" is going to hold the multiple code values which i need to pass into whare clause of the above SQL: the totlal number of these mulitipe codes can be more then 50..
And lv_character values are commung from a setup table
lv_character varchar2(32767):= '('||''''||'COMMIS'||''''||' , '||''''||'AGY BUILDING BENS'||''''||')';
--And lv_character values are commung from a setup table.where "lv_character" holdes multipe code values...
And lv_character values are commung from a setup table and upper(d.v_code)in lv_characterif the
View 3 Replies
View Related
Jun 9, 2012
I am trying to select multiple values from a parameter form based on a select statement.
I created the parameter and write the select statement under list-of-value property However what I want is to let users choose multiple values from the select statement not only one value.
View 1 Replies
View Related
Jun 27, 2013
It is not possible to run SHRINK SPACE against a table with a function based index. This is documented, and I've tested on the current release. I've reverse engineered it a bit, and the issue is in fact that you cannot SHRINK SPACE if there is an index on a virtual column:SQL> SQL> create table t1(c1 number, c2 as (c1*2)) segment creation immediate;
Table created.
SQL> alter table t1 enable row movement;
Table altered.
SQL> alter table t1 shrink space;
Table altered.
SQL> create index i1 on t1(c2);
Index created.
SQL> alter table t1 shrink space;
alter table t1 shrink space
ERROR at line 1: ORA-10631: SHRINK clause should not be specified for this object.
View 2 Replies
View Related
Aug 5, 2010
if function having retrun statement, why we need to use out or inout parameters.
View 16 Replies
View Related
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
Feb 27, 2013
i am trying to call a function from Sql statement and i am getting this error ORA-06572: Function XX has out arguments.
View 2 Replies
View Related
Dec 13, 2010
I have one table emp with columns id , name and dept. i want query to get the list like this........
ID name did
1 ajay 10,30,40,60
2 sree 10,30,70
View 7 Replies
View Related
Oct 23, 2012
I have oracle table has records like this clnt pno beg_dt end_dt load_ts
502852 02 01-NOV-93 31-OCT-94 01-AUG-12
502852 01 01-OCT-93 31-AUG-94 01-SEP-12
502866 01 01-JUN-90 31-DEC-90 01-AUG-12
256974 01 01-JAN-90 31-MAY-90 01-SEP-12
280441 01 01-JUN-96 31-MAY-97 01-AUG-12
[Code]....
I am writing an oracle query using analytic funtion to list that has max(load_ts)
But my query returns bad results and retrieve all the records for some reason.
select a.*
from
(
select
CLNT,
[Code]....
View 5 Replies
View Related
Dec 16, 2010
Is there any way to get audit_trail.VALUE? I know the statement: show parameter audit_trail; can show that value. But, i want to build a function which will return a string that contain audit_trail.VALUE
View 1 Replies
View Related
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
Nov 8, 2012
I have written as function :
create FUNCTION Cov(p_str1_x IN VARCHAR2,p_str2_x IN VARCHAR2, p_str1_y IN VARCHAR2,p_str2_y IN VARCHAR2) RETURN NUMBER is
TYPE ty_varchar_assoc IS TABLE OF VARCHAR2(100) INDEX BY VARCHAR2(100);
v_x ty_varchar_assoc;
v_y ty_varchar_assoc;
v_inter ty_varchar_assoc;
[Code]....
Now i need to pass the values to the parameter from a table? How can i do that?
View 2 Replies
View Related
Oct 18, 2011
I would like to know if it is possible to get the arguments of a function (or procedure), in the same way as - for example - the "arguments" object in JavaScript.
I have seen the table ALL_ARGUMENTS, for example, that is providing a lot of interesting details, but I still miss the most important for me: the values of the arguments, not only the name, or type, etc...
Something that could be called as soon as the function (or procedure) is run, at the beginning of its process, and that would give a kind of array of arguments values.
View 5 Replies
View Related
Jul 17, 2012
i have this function
create function xxx_sal (p_number in number)
return number is
v_sal number;
begin
select sum(sal)
into v_sal
from emp
where empno = p_number;
return v_sal;
end;
how can called it in oracle forms
View 8 Replies
View Related
Oct 18, 2011
get rid of the below error
CREATE OR REPLACE FUNCTION fn (
p_salesrep_id IN jtf_rs_salesreps.salesrep_id%TYPE,
p_org_id IN jtf_rs_salesreps.org_id%TYPE,
p_cnf_date IN emcint_ord_headers_all.creation_date%TYPE
[Code]....
Invoking Functions
select fn(-3,293,'1/1/1952'), resource_id from jtf_rs_salesreps
where rownum < 5
ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
View 8 Replies
View Related
Jul 23, 2010
I'm trying to execute a dynamic sql that calls a function. But that function has inserts and deletes inside and this way it can't be called through a select statement. And to be worst, it has an other problem, my function uses a record type as parameter.
My code (sample):
-----------------
DECLARE
type r_parameters is record
(cd_query cons_query_param.cd_query%type,
cd_usuario cons_query_user.cd_usuario%type,
nr_param cons_query_param.nr_param%type,
vl_param varchar2(2000),
[code].....
View 5 Replies
View Related
Jul 18, 2012
here is the situation, I have to write a function that receive as parameter a datatype varchar2 and validate if the letter is less than "A" or greater than "Z", it must print do not correct, or correct depending on the situation, no problem so far, the only problem I've got is: If the symbol is ";" is valid, but i do not know how to write it, It does not depend on the PL/SQl languaje but depends on the logic itself.
DECLARE
v_nombre varchar2(20):='john;%';
vv varchar2(1);
begin
for i in 1..length(v_nombre) loop
[code]...
View 2 Replies
View Related
Jan 21, 2011
We are trying to export our production data .We got this error
. . exporting table EA_BLOB
EXP-00056: ORACLE error 24801 encountered
ORA-24801: illegal parameter value in OCI lob function
how to overcome this error ?
View 2 Replies
View Related
Dec 23, 2012
My need is to pass multiple values as single input parameter into pipelined function. For example - "2" and "3" are values of input parameter "t":
with data as (
select 1 as t from dual union all
select 2 as t from dual union all
select 3 as t from dual union all
select 4 as t from dual union all
select 5 as t from dual
)
select * from data where t in (2,3)
View 2 Replies
View Related
Jul 1, 2013
I want to replace double space with single space and also remove junk characters from the data. How can I do that?
CREATE TABLE test07013
(
NAME VARCHAR2(50)
);
INSERT INTO VALUES ('WARREN,'); -- REMOVE ","
INSERT INTO VALUES ('CLARK H'); -- REPLACE "DOUBLE SPACE" WITH "SINGLE SPACE"
INSERT INTO VALUES ('BRYAN A.'); -- REMOVE "."
INSERT INTO VALUES ('CARTER JR. ROBERT'); -- REMOVE "."," AND REPLACE "DOUBLE SPACE" WITH "SINGLE SPACE"
View 8 Replies
View Related
Aug 9, 2013
I have a field "Email". The length of it is restricted to 30. But i mayget more than 30 characters. So how to trim the email address so that its max length is 30 characters.
View 5 Replies
View Related