ORA-00904 after creating a relationship with object_ref
Hi allStupidly, I created a master / detail relationship using an object_ref. I cannot now make a query on the master block I get ORA-00904: 'C': identifier not valid when 'c' is the alias of the table.
i.e. SELECT ROWID, REF c, c.CSPL_ID, c.CCUST_CCUST_ID, c.CRTN_USER, c.DESCR, com_sop_prd_lists c.DATE_CRTD c
I removed the link, but the error persists. I looked in the code but don't for the life of me find where this REF (c) is defined. Any ideas where to look?
Concerning
Jen
Hello
Go to palette property of the header of the block and find the property called Alias in the database section and put under vacuum using color red inherit from the top toolbar. And set the property include REF point on no..
Then run your form, it should work.
-Clément
Tags: Oracle Development
Similar Questions
-
ORA-00904 on CREATE TABLE with a virtual column based on the XMLTYPE content
Hello
This is another one for the gurus of the syntax...
Try the following, fails with ORA-00904: "MESSAGE". "' GETROOTELEMENT": invalid identifier
While it succeedsCREATE TABLE XML_TEST_VIRT ( MSG_TYPE GENERATED ALWAYS AS (MESSAGE.GETROOTELEMENT()) VIRTUAL, MESSAGE XMLTYPE NOT NULL, IE906 XMLTYPE DEFAULT NULL ) XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML XMLTYPE COLUMN IE906 STORE AS SECUREFILE BINARY XML /
The GETROOTELEMENT from SYS member function. XMLTYPE is stated as "PARALLEL_ENABLE DETERMINISTIC" the method called is not the problem, as evidenced by the 2nd case.CREATE TABLE XML_TEST_VIRT ( MSG_TYPE GENERATED ALWAYS AS (EXTRACT(MESSAGE, '/*').GETROOTELEMENT()) VIRTUAL, MESSAGE XMLTYPE NOT NULL, IE906 XMLTYPE DEFAULT NULL ) XMLTYPE COLUMN MESSAGE STORE AS SECUREFILE BINARY XML XMLTYPE COLUMN IE906 STORE AS SECUREFILE BINARY XML /
Using the MESSAGE column that is of type XMLTYPE directly seems to be the problem. But the question is "why." The result of the EXTRACT function is of type XMLTYPE and call his works of members, the column is also of type XMLTYPE still call its members fails...
Thanks in advance for any ideas on that.
Best regards
PhilippeGoing on the means to go far, far back.
-
How to format the column in order to create a relationship with the other field of the table
I have two tables. Table A, table B
In table A, I have records with over no matter what hyphen e.g. 124545, domain name is late but in table B I have the files archived with a hyphen after the second digit as 12-4545.
I am trying to create a relationship between two tables.
Select a.TaxId, B.TaxId
Table A, table B
where a.TaxId = late b.
How can I remove the hyphen to create a relationship between two tablesHello
REPLACE is good for this:
SELECT * -- or whatever FROM table_a a JOIN table_b b ON a.taxid = REPLACE (b.taxid, '-') ;
REPLACE (b.taxid, '-') returns a copy of b.taxid with any '-is removed, it will return "12345" If b.tax_id is one of the following
12345
12-345
1-2345
03/12/45
-12345
-1 - 2 - 3 - 4 - 5- -
"Getting Started" VM said "ORA-01471: cannot create a synonym.
People,
I downloaded the VM with demo integration OGG + ODI for 12.1.3, as well as the PDF "Getting Started with Oracle Data Integrator 12 c". Try step 10.3.2 on pg 92: "Initial running load staged Mapping", but it throws the error message:
ODI-1228: task Create synonym on target-LKM Oracle for Oracle (DBLINK) - fails when connecting the TRG_ODIDEMO target.
Caused by: java.sql.SQLException: ORA-01471: cannot create a synonym with the same name as the object
He told the truth, I tried the code in sqlplus with the same error:
SQL > conn odi_staging/oracle;
Connected.
SQL > create synonym ODI_STAGING. C$ _0OGG_CUSTOMER1 for ODI_STAGING. C$_0OGG_CUSTOMER1@ORCL;
ERROR on line 1:
ORA-01471: cannot create a synonym with the same name as the object
Initially, the definition of database server did not have the Instance = orcl inside, I added and got the same error with and without "orcl". Why is this happening? Another odd piece that may be associated with: I tried this mapping even earlier, and it got stuck on the front line, trying to create a view, but was insufficient privs for ODI_STAGING select the ogg_customer table. So I just did "grant dba to odi_staging;" and that was not enough! Tried stop/start ODI, then the DB without change. Hmmm, s/n role not enough? I've also had "grant select any table of odi_staging;", then this line worked.
Back to the current problem: I can get the other procs to run, as the Clean Up target tables works very well, and the demo Client works very well.
(1) anyone has experience this problem of synonym?
(2) no matter who else get it to work?
-Thanks, Steve F.
I got the fix in the product manager. There are two very similar LKMs:
- LKM Oracle for Oracle (DBLINK) (must be imported)
- LKM Oracle for Oracle shoot (DB Link). GLOBAL (integrated)
Of course, they look the same to me except that the second works and one doesn't. In all honesty, the book on pg 89 says 'Pull' in the name. Chalk it up to user error. Detective Conan.
-
DROP table and CREATE with column name and ORA: 00904
Hello
I created a table with an attribute date CRTD_ON and two other attributes. Successfully created. I can see the data tab and the window empty data with column names in the header...
Now, I had to change the name of field attribute date on OPNG_DATE so I don't bother to change, instead, I deleted and created with the name of the column has changed. Then I restart the ddl. Once again managed to create. But this time I am not able to see the data tab or the column headings. And I see the error of the log of the data Publisher ORA-00904: "CRTD_ON": invalid identifier
Is this a bug?There is a current bug where you will get the data if you have a public synonym with the same table name pointing to another table with another structure. Can you confirm that in your environment?
K.
-
Hello. I have a problem of creating tables with nested tables.
After you have created a few types, I would create a table based on these, but I get
SQL error: ORA-00904: invalid identifier
+ 00904. 00000 - '% s: invalid identifier ' +.
over and over again. This is my SQL code:
1 create or replace TYPE t_indirizzo () AS OBJECT
via VARCHAR (45), 2
3 NUMBER,
4 cap INTEGER (5).
5 Città varchar (30),
6 provincia varchar (30),
region 7 varchar (30)
)
8 create or replace TYPE t_telefono () AS OBJECT
9 num_tel Number (15)
)
10 create or replace TYPE t_listaTelefono AS TABLE OF THE t_telefono
11 create or replace TYPE t_cliente () AS OBJECT
12 cod_cliente NUMBER (8).
13 address t_indirizzo,
14 email varchar (30),
Telefono 15 t_listaTelefono
(16) NOT FINAL
17 CREATE TABLE client (t_cliente)
18 cod_cliente NOT NULL,
19 address NOT NULL,
email 20 NOT NULL,
21 PRIMARY KEY (cod_cliente)
(22) TABLE IMBRIQUE 'telefono' STORE AS 'numTelCli_tab '.
23 RETURN VALUE
My version of Oracle is 10.2.0. Thank you in advance.
Published by: user11231503 on 2.35 giu-8-2009so, just to be sure, run this:
create or replace TYPE t_indirizzo AS OBJECT ( via VARCHAR(45), numero NUMBER, cap INTEGER(5), citta VARCHAR(30), provincia VARCHAR(30), regione VARCHAR(30) ); / create or replace TYPE t_telefono AS OBJECT ( num_tel NUMBER(15) ); / create or replace TYPE t_listaTelefono AS TABLE OF t_telefono / create or replace TYPE t_cliente AS OBJECT ( cod_cliente NUMBER(8), indirizzo t_indirizzo, email VARCHAR(30), telefono t_listaTelefono ) NOT FINAL; / CREATE TABLE cliente OF t_cliente( cod_cliente NOT NULL, indirizzo NOT NULL, email NOT NULL, PRIMARY KEY (cod_cliente) ) nested table telefono store as numTelCli_tab return as value /
-
SDO ORA-00904 identifier valid after patch 20544696 and 20225988 (CPU Apr 15)
The seller of our web mapping system uses a syntax that contains the identifier SDO_GEOM. SDO_GEOMETRY and similar. An example simplified using the point constructor ODD as in...
Select sdo_geom.sdo_geometry (2001, 81989, sdo_geom.sdo_point_type (531599, 184530, null), null, null) double;This syntax has stopped working in the TEST database, after I applied the patches April 2015 CPU. It generates an ORA-00904: "SDO_GEOM. "" SDO_GEOMETRY ': identifier not valid, which in fact I was expecting. The package SDO_GEOM in schema MDSYS, often referenced without the option scheme by the public synonym, do not contain a type or function SDO_GEOMETRY. I've never used this syntax and wrote instead...
Select mdsys.sdo_geometry (2001, 81989, mdsys.sdo_point_type (531599, 184530, null), null, null) double;
.. of course, who continues to work. However, to my surprise, I found that the syntax of the provider, which generates the ORA-00904 in all databases of fix post, works perfectly well in all our pre patch databases.
Is the same for all other types in the MDSYS (SDO_ELEM_INFO_ARRAY, SDO_ORDINATE_ARRAY...) schema.
I'm dealing with the strange situation where I not only understand why something has stopped working; first of all I do not understand why the syntax of the seller has already worked.
We are using Oracle 11.2.0.4 EE with Oracle Spatial on Windows Server 2008 R2 64-bit. Patches that have been requested are
1) patch 20544696: WINDOWS DB BUNDLE PATCH 11.2. 0.4.15
2) patch 20225988: WINDOWS ORACLE JAVAVM COMPONENT BUNDLE PATCH 11.2. 0.4.3Kind regards
Torsten
Hi Torsten,
Well, here you have a kind of strange thing Oracle Spatial. If you told me that
SELECT SDO_GEOM.SDO_GEOMETRY(2001, 81989, SDO_GEOM.SDO_POINT_TYPE(531599, 184530, NULL), NULL, NULL) FROM dual;
is a valid statement, I'd say of course not. But on my production server which is the power supply 11.2.0.4.5, it works!
However, on a 12 c test server it does not work.
All I can say is that you are right in everything you say. Oracle has removed everything that made this weird syntax once the work and it seems that the PSU April stops for good. Your provider needs to fix things and perhaps address why they used such a weird thing in the first place.
Like you I don't see what makes this function on 11g. There is no synonym that I see. And if wrap you it in an anonymous block fails
DECLARE foo SDO_GEOMETRY; BEGIN SELECT SDO_GEOM.SDO_GEOMETRY(2001,81989,SDO_GEOM.SDO_POINT_TYPE(531599,184530,NULL),NULL,NULL) INTO foo FROM dual; END; /
Strange thing indeed. I guess there could be a wider discussion here on what patches are in turn brought in 11g and if the side effects are always worth.
See you soon,.
Paul
-
With the help of the ORA-00904 granted by ROLE
Hi all
I have an error using the grant through ROLE (Oracle 11.2.0.1 on redhat Linux)
Here is the explanation of my problem:
I create a package to wear patterns
create or replace PACKAGE usera.pkg_utils AS function f_my_function return RAW; END pkg_utils;
I create the package body:
create or replace PACKAGE BODY usera.pkg_utils AS function f_my_function return RAW is v_uuid RAW(16); begin v_uuid := sys.dbms_crypto.randombytes(16); return (utl_raw.overlay(utl_raw.bit_or(utl_raw.bit_and(utl_raw.substr(v_uuid, 7, 1), '0F'), '40'), v_uuid, 7)); end f_random_uuid; END pkg_utils;
I create a 'R_ROLE1' role to which I admit "EXECUTE ON USERA. PKG_UTILS TO R_ROLE1.
I give you that R_ROLE1 to the PUBLIC so that each user can access the package USERA. PKG_UTIS
If I call another user f_my_function, it works well.
If I call another user from a procedure f_my_function I get "ORA-00904".
ex: to UserB
create or replace PROCEDURE P_PROC AS num int; uuid_ RAW(16); BEGIN select usera.pkg_utils.f_my_function() into uuid_ from dual; END P_PROC; /
If I give you that directly "GRANT EXECUTE ON USERA. PKG_UTILS TO PUBLIC' so it works well.
Thus, the error comes from the fact that I use a role, but I can't fix it. I don't understand why USERB does not use its grant to the role of r_role1 granted to PUBLIC.
Is there something as USERB is unusable cascade role during the call to a procedure? is there something to "activate"? ".
Thank you all
See the doc database security for your answer and the explanation of what others have said.
http://docs.Oracle.com/CD/B28359_01/network.111/B28531/authorization.htm#i1007304
Operation of the roles in PL/SQL blocks
The use of roles in a PL/SQL block depends on if it is an anonymous block, or a block named (stored procedure, function, or trigger), and if it runs with the rights of the author or the rights of the applicant.
Roles used in the appointed with rights to define blocks
All roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.
The
SESSION_ROLES
view shows all roles that are currently enabled. If a named PL/SQL block that runs with Definer Rights queriesSESSION_ROLES
, then the query will return no rows. -
What's * NOT * less out error with ORA-00904?
If it's in the manual, please point to me. I fully expect it give me the error the second time around.SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta PL/SQL Release 11.2.0.2.0 - Beta CORE 11.2.0.2.0 Production TNS for 32-bit Windows: Version 11.2.0.2.0 - Beta NLSRTL Version 11.2.0.2.0 - Production SQL> drop table t1; Table dropped. SQL> drop table t2; Table dropped. SQL> create table t1 (some_order_line_id number); Table created. SQL> create table t2 (order_line_id number); Table created. SQL> SELECT order_line_id FROM t1 2 / SELECT order_line_id FROM t1 * ERROR at line 1: ORA-00904: "ORDER_LINE_ID": invalid identifier SQL> SELECT * FROM t2 WHERE order_line_id IN (SELECT order_line_id FROM t1); no rows selected SQL>
PS:
It was the same in 11 GR 2 Enterprise Edition too.
Published by: RPuttagunta on August 16, 2011 12:53No, you cannot rewrite the query it.
SELECT * FROM t2 WHERE t2.order_line_id IN (SELECT t2.order_line_id FROM t1);
would be equivalent to
SELECT * FROM t2 WHERE t2.order_line_id IS NOT NULL AND EXISTS ( SELECT 1 FROM t1 )
If you assume that T1 has at least one line and that T2. ORDER_LINE_ID is NOT NULL, it is equivalent to
SELECT * FROM t2
For each row in T2, Oracle would choose the T2. ORDER_LINE_ID of T1. Assuming that T1 has at least one line and that ORDER_LINE_ID is NOT NULL, it will come back N rows with values not equal NULL (1 row for each row of T1). The IN, by definition, could be set to TRUE.
Thus, while it is a valid syntax, it is very unlikely that the syntax that you'd really like.
Justin
-
Hello
How to convert a 2D to 3D Image
Create a video with always shoot in 3d
Old Photo converted to 3D as video 2d
(Photoshop and After Effects)
Thank you
It's called a cinemagraphs.com. You slice the image in the foreground and background elements, plug the holes and then place them in a 3D space - in after effects or a 3D program, no PS
Mylenium
-
I am trying to create a slideshow with Adobe Photoshop 12. After a few episodes to work on it, some of the slide pictures disappear. Very frustrating. Why? I'm to access photos from the catalogue and folders on my computer. Disappearances seem random.
Elements Photoshop Elements
-
Update fails with ORA-00904 invalid identifier
Hi all
I have problems of construction of an ' update '. Execute the following select statement,
ReturnsSELECT XREF.REGN_ID, XREF.COUNTY_NM, OWNER.CASE_OWNER_ID, OWNER.FORMER_AREA, OWNER.AREA, OWNER.COUNTY_NUMBER, OWNER.OFFICE FROM PS2_CASE_OWNER_SEYED OWNER, DWFSSD.TAFS_REGN_AREA_XREF_MART XREF WHERE (OWNER.AREA = XREF.AREA_ID(+)) AND (OWNER.OFFICE = XREF.OFFICE_CD(+) ) AND (OWNER.COUNTY_NUMBER = XREF.COUNTY_NUM(+))
I am trying to execute the following statement, "Update", update the PS2_CASE_OWNER_SEYED table.REGN_ID COUNTY_NM CASE_OWNER_ID FORMER_AREA AREA COUNTY_NUMBER OFFICE "1" "Alfalfa" "5008756" "1" "1" "02" "C" "1" "Alfalfa" "5008954" "1" "1" "02" "C" "1" "Beckham" "5008803" "1" "1" "05" "C" "1" "Beckham" "5008222" "1" "1" "05" "C" "1" "Beckham" "5008223" "1" "1" "05" "C" "1" "Beckham" "5008424" "1" "1" "05" "C" "1" "Beckham" "5008442" "1" "1" "05" "C" "1" "Beckham" "5008780" "1" "1" "05" "C" "1" "Beckham" "5008787" "1" "1" "05" "C" "1" "Beckham" "5008788" "1" "1" "05" "C"
The "Update" statement returns the following error:UPDATE ( SELECT OWNER.AREA, XREF.REGN_ID, XREF.COUNTY_NM FROM PS2_CASE_OWNER_SEYED OWNER, DWFSSD.TAFS_REGN_AREA_XREF_MART XREF WHERE (OWNER.AREA = XREF.AREA_ID(+)) AND (OWNER.OFFICE = XREF.OFFICE_CD(+) ) AND (OWNER.COUNTY_NUMBER = XREF.COUNTY_NUM(+)) ) SET OWNER.FORMER_AREA = OWNER.AREA, OWNER.AREA = XREF.REGN_ID, OWNER.COUNTY_NAME = XREF.COUNTY_NM;
Any ideas what's wrong with the update statement?ORA-00904: "XREF"."COUNTY_NM": invalid identifier
Thank you
SeyedHi, Seyed,
Here's a way to do this UPDATE:
UPDATE emp SET sal = sal * 1.05 , comm = NVL (comm, 0) + 500 WHERE deptno IN ( SELECT deptno FROM dept WHERE loc = 'DALLAS' ) ;
If you want to use an inline view, you can do this:
UPDATE ( SELECT e.sal , e.comm FROM emp e JOIN dept d ON d.deptno = e.deptno WHERE d.loc = 'DALLAS' ) SET sal = sal * 1.05 , comm = NVL (comm, 0) + 500 ;
Whatever it is, the emp table is left as you wish:
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ----- ------ --------- ----- ---------- ---------- ----- ------ 7782 CLARK MANAGER 7839 06/09/1981 2450 10 7839 KING PRESIDENT 11/17/1981 5000 10 7934 MILLER CLERK 7782 01/23/1982 1300 10 7876 ADAMS CLERK 7788 05/23/1987 1155 500 20 7902 FORD ANALYST 7566 12/03/1981 3150 500 20 7566 JONES MANAGER 7839 04/02/1981 3123.75 500 20 7788 SCOTT ANALYST 7566 04/19/1987 3150 500 20 7369 SMITH CLERK 7902 12/17/1980 840 500 20 7499 ALLEN SALESMAN 7698 02/20/1981 1600 300 30 7698 BLAKE MANAGER 7839 05/01/1981 2850 30 7900 JAMES CLERK 7698 12/03/1981 950 30 7654 MARTIN SALESMAN 7698 09/28/1981 1250 1400 30 7844 TURNER SALESMAN 7698 09/08/1981 1500 0 30 7521 WARD SALESMAN 7698 02/22/1981 1250 500 30
-
ORA-00904 ROW_NUMBER, problem with ORDER BY id
Hello world
I use Oracle 9i, I use ROW_NUMBER and I got the ORA-00904 because of the ORDER BY identifier.
And here is the error:SELECT * FROM (SELECT c.id_comp, c.nom, c.id_type_comp, c.libelle, c.standard, c.id_comp_std, c.id_comp_grp, (SELECT t.nom FROM type_composant t WHERE t.id_type_comp=c.id_type_comp ) AS nom_type_comp , (SELECT t.libelle FROM type_composant t WHERE t.id_type_comp=c.id_type_comp ) AS libelletype, (SELECT cc.nom FROM composant cc WHERE cc.id_comp=c.id_comp_std ) AS nom_comp_std, (SELECT ccc.nom FROM composant ccc WHERE ccc.id_comp=c.id_comp_grp ) AS nom_comp_grp, ROW_NUMBER() OVER (ORDER BY nom_type_comp) R FROM composant c) WHERE nom LIKE '%' AND R BETWEEN 0 and 200 ORDER BY nom_type_comp;
Apparently, it takes the pseudonym I use. I tried with the query instead of the alias, and it worked. Is there a way to do it with the alias because I would use a variable with my ORDER BY.ROW_NUMBER() OVER (ORDER BY nom_type_comp) R FROM composant c) * ERROR at line 25: ORA-00904: "NOM_TYPE_COMP": invalid identifier
Any help would be nice!
Andalusians
Published by: Guich may 12, 2011 10:40You may not use an alias defined on the same query plan.
The alias must be from a subquery.
Such as:SELECT * FROM (select my_table.*, ROW_NUMBER() OVER (ORDER BY nom_type_comp) R from (SELECT c.id_comp, c.nom, c.id_type_comp, c.libelle, c.standard, c.id_comp_std, c.id_comp_grp, (SELECT t.nom FROM type_composant t WHERE t.id_type_comp=c.id_type_comp ) AS nom_type_comp , (SELECT t.libelle FROM type_composant t WHERE t.id_type_comp=c.id_type_comp ) AS libelletype, (SELECT cc.nom FROM composant cc WHERE cc.id_comp=c.id_comp_std ) AS nom_comp_std, (SELECT ccc.nom FROM composant ccc WHERE ccc.id_comp=c.id_comp_grp ) AS nom_comp_grp FROM composant c) my_table) WHERE nom LIKE '%' AND R BETWEEN 0 and 200 ORDER BY nom_type_comp;
Nicolas.
-
Create MVIEW fails with ORA-30036
Hello
I get the error ORA-30036 when you try to create a MVIEW:
ORA-30036: unable to extend segment by 4 in undo tablespace "UNDOTBS1.
I would like to understand why I get this error? is the creation of MVIEW uses the undo tablespace? What other info I can give you if it helps?
Thank you.CREATE MATERIALIZED VIEW MY_MVIEW AS SELECT col1,col2,col3,col4,col5,col6,col7 FROM Table WHERE col1 = 'A'
Yes, creating a view Matt will use cancellation space. A materialized view actually creates a table with the results of the view, so he uses undo to save inserting rows, and to tracj, updates the allocation data dictionary and the space.
John
-
ORA 00904: invalid identifier "JAN".
Hello
I have the rest of the table.
===========================================
create table ATT_ATTENDANCESHEET as
(
Select 1 empid, to_date('21/01/2014','dd/mm/yyyy') prdate, 240 reg, 0 unpaid all double union
Select 2, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 200 reg, 0 unpaid all double union
Select 3, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 240 reg, 0 unpaid all double union
Select option 4, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 480 reg, 0 unpaid all double union
Select 5, to_date (January 21, 2014 ', ' dd/mm/yyyy'), 240 reg, unpaid double 0
);
=================================================
I want to remove rows from table ATT_ATTENDANCESHEET.
If the parameter passed empids, lines for employees would be eliminated.
If empids is null, all records between the given period will be deleted.
I created after the procedure to that effect.
------------------------------------------------------
CREATE or replace FUNCTION deleteAttendanceDetails (startdate DATE, enddate DATE, empids varchar2) RETURN NUMBER as
n number;
condition varchar2 (200);
vsql varchar2 (2000);
BEGIN
IF empids is not null
THEN
condition: condition = |' and empid in ('| empids |') ' ;
END IF;
vsql: =' delete from ATT_ATTENDANCESHEET where prdate between ' | StartDate | 'and' | EndDate | condition;
EXECUTE IMMEDIATE (vsql);
return n;
END;
/
The empids parameter contains the employee IDS separated by commas.
for example
"1,2,3,4"
-----------------------------------------------------------
But when I call this function using
Select deleteAttendanceDetails (to_date('25/01/2014','dd/mm/yyyy'), to_date (' 01/31/2014 ',' dd/mm/yyyy'), ") double;
I get the following error
ORA 00904: invalid identifier "JAN".
ORA-06512: at.. .line 21
I use oracle 10g.
Help, please
Do not use dynamic sql. It's more trouble that it's worth.
Your error comes from the fact that you convert a date to a string, implicitly and then come back.
In addition, your example doesn't have a field of prddate... so I added that, in my test table so that it works.
Try something like that, entirely avoid dynamic sql:
CREATE or replace FUNCTION deleteAttendanceDetails ( startdate DATE, enddate DATE, empids varchar2 ) RETURN NUMBER as n number; BEGIN delete from ATT_ATTENDANCESHEET where ( empid IS NULL OR empid in ( select regexp_substr ( empids, '[^,]+', 1, level) empid from dual connect by level <= (LENGTH(empids) - LENGTH(REPLACE(empids, ',')) + 1) ) ) and prdate between nvl(startdate, to_date('01-jan-1900','dd-mon-yyyy')) and nvl(enddate , to_date('01-jan-5000','dd-mon-yyyy')); return n; -- what is "n" ? END; /
Not really sure what you want to do with "n"... you have nothing in your code... so I did the same
Maybe you are looking for
-
iPod Nano would not download songs from Apple
Sync music between Macbook and iPod Nano. Received an error a few songs from Apple could not transfer. Why not and what do I do?
-
Hello Can I get an entry on Ports 5800-5821 and 5900-5921. It is necessary at the launch of the e-courses through Learning Manager Portal. https://www.microsoftelearning.com/eLearning/courseDetail.aspx?CourseID=194999 Ganesh Kulkarni
-
How to remove the program to update Norton Antivirus
Can Hoiw I remove an obsolete Norton Anit Virus program? I tried all the standard methods, and it is still there.
-
Parent part number of the Board of Directors of hp Mini 210
Body aid like me to locate the part number of my computer hp mini 210. I opened the back cover, but you don't know where it is. See you soon,. Sylvain
-
6 - 1150ec envy: envy of 6-1150ec
Hello got my HP today, but after recovery USB drive recovery but I have this error: ChkErrBB.CMD: Detects an error in the PININST_BBV. ChkErrBB.CMD: Check C:\system.sav\logs\BurnBootWarn.logChkErrBB.CMD: or, visit c:\systems.sav\logs\BurnBootMerge.lo