Error(11,1): PL/SQL: SQL Statement ignored
FUNCTION getName ( theSSN IN NUMBER ) RETURN VARCHAR2
IS
theTotal NUMBER;
theName VARCHAR2(40);
s varchar2(10);
BEGIN
select count(*) into theTotal from employee where SSN = theSSN;
if (theTotal = 0) then
RETURN('');
else
select sex as s, (FName || ' ' || Lname) into theName
from employee
where SSN = theSSN;
if s='f' then
RETURN (theName);
end if;
end if;
endI should how to write this line. Thank!
Hi,
Try to modify next in bold :
FUNCTION getName ( theSSN IN NUMBER ) RETURN VARCHAR2
IS
theTotal NUMBER;
theName VARCHAR2(40);
s varchar2(10);
BEGIN
select count(*) into theTotal from employee where SSN = theSSN;
if (theTotal = 0) then
RETURN('');
else
select sex <s>as s</s>, (FName || ' ' || Lname)
into s, theName
from employee
where SSN = theSSN;
if s='f' then
RETURN (theName);
else
RETURN('');
end if;
end if;
endNicolas.
Similar Messages
-
Error: PL/SQL statement ignored
In the code below i am getting 3 errors:
a. PL/SQL statement ignored
b. PLS-00201
c. PL/SQL: ORA-00904 : invalid identifier
please help. thank you
=========================================
Package body:
=========================================
create or replace package BODY manage_students
as
procedure find_sname
(i_student_id IN student.student_id%TYPE,
o_first_name OUT student.first_name%TYPE,
o_last_name OUT student.last_name%TYPE)
IS
v_student_id student.student_id%TYPE;
BEGIN
select first_name, last_name
into o_first_name, o_last_name
from student
where student_id = i_student_id;
exception
when others
then
DBMS_OUTPUT.PUT_LINE('Error in finding student_id: '||v_student_id);
end find_sname;
function id_is_good
(i_student_id in student.student_id%TYPE)
return BOOLEAN
IS
v_id_cnt number;
begin
select count(*)
into v_in_cnt
from student
where student_id = i_student_id;
return 1 = v_id_cnt;
EXCEPTION
when others then
return FALSE;
end id_is_good;
END manage_students;
=========================
Package specification:
=========================
set serveroutput on
create or replace package manage_students
as
procedure find_sname
(i_student_id IN student.student_id%TYPE,
o_first_name OUT student.first_name%TYPE,
o_last_name OUT student.last_name%TYPE
function id_is_good
(i_student_id IN student.student_id%TYPE)
RETURN BOOLEAN;
END manage_students;
Edited by: [email protected] on Mar 19, 2009 6:03 AM
Edited by: [email protected] on Mar 19, 2009 6:03 AMCongrats, someonElse! ;-)
And about the when others: read about it on asktom why it's a bad practice, here's an example:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1509245700346768268#1535781400346575552
I've spent myself way too much time on finding and fixing bugs caused by 'when others', so I always comment about it too ;-)
Edited by: hoek on Mar 19, 2009 2:14 PM
Edited by: hoek on Mar 19, 2009 2:18 PM -
Error message "SQL Statement ignored" while try to run an Funtion in APEX
Hello All,
In order to creating an application in APEX from CSV format i need to run below funtion.
CREATE OR REPLACE FUNCTION bcl_custom_auth (
p_username IN VARCHAR2,
p_password IN VARCHAR2)
RETURN BOOLEAN IS
BEGIN
FOR c1 IN (SELECT 1
FROM bcl_employees
WHERE UPPER(userid) = UPPER(p_username)
AND UPPER(last_name) = UPPER(p_password))
LOOP
RETURN TRUE;
END LOOP;
RETURN FALSE;
END;
but i am getting below error message:
Error at line 6: PL/SQL: SQL Statement ignored
4. RETURN BOOLEAN IS
5. BEGIN
6. FOR c1 IN (SELECT 1
7. FROM bcl_employees
8. WHERE UPPER(userid) = UPPER(p_username)
Could some body please check as i am new to PLSQL.
Thanks & regards,
Souvik Ghosh843873 wrote:
Hello Edstevens,
I did not understand your answer .Could you please elaborate.
Thanks & regards,
Souvik Ghosh
Edited by: 843873 on Jul 8, 2011 11:43 PMNotice that the message had been edited? I changed my mind from my original, shot-from-the-hip, mesage, and simply deleted the entire content. would have preferred to delete the entire message but can't. -
Error in Trigger (PL/SQL: SQL Statement Ignored)
Here is the trigger:
CREATE OR REPLACE TRIGGER DRUGREPLACEMENT
AFTER INSERT ON PHARMACEUTICALS
REFERENCING NEW AS newDrugs
FOR EACH ROW
WHEN (newDrugs.drugname = newDrugs.genericname)
BEGIN
UPDATE prescription
SET pharmaceuticalid = newDrugs.drugID
WHERE pharmaceuticalid IN(SELECT pharmaceuticalid FROM prescription, pharmaceuticals WHERE drugid = pharmaceuticalid AND newDrugs.genericname = pharmaceutical.genericname);
END;
Error is:
Error(2,1): PL/SQL: SQL Statement ignored
Error(3,24): PL/SQL: ORA-00904: "NEWDRUGS"."DRUGID": invalid identifier
pharmaceuticalid is a number in my prescription table.
drugid is a number; genericname and drugname are both varchars in my pharmaceuticals table. Any idea why I am getting these errors? (I tried putting quotes around newdrugs.drugid but then it just said "newdrugs.drugid" is invalid. Thanks for your help
-BrianOne more thing. Your trigger is selecting from triggering table. So single row inserts will work, but multiple row inserts into PHARMACEUTICALS will fail with famous "table is mutating" error. There is no need to select from PHARMACEUTICALS. Change:
UPDATE ************
SET pharmaceuticalid = newDrugs.drugID
WHERE pharmaceuticalid IN(SELECT pharmaceuticalid FROM ************, pharmaceuticals WHERE drugid = pharmaceuticalid AND newDrugs.genericname = pharmaceutical.genericname);to
UPDATE ************
SET pharmaceuticalid = newDrugs.drugID
WHERE pharmaceuticalid IN (
SELECT pharmaceuticalid
FROM ************
WHERE drugid = :newDrugs.pharmaceuticalid
AND :newDrugs.genericname = pharmaceutical.genericname
);SY. -
SQL Statement ignored performing List of Values query
Hi, New user just learning the basics. I have created a simple table PERSON with columns, ID, firstname, lastname, phone, city, State_ID
Then clicked create Lookup table - State_Lookup with columns State_ID and State_Name.
I create a page, include all columns from PERSON. For State the field is a select list that should do a lookup form the STATE_LOOKUP table. (I have entered 4 states in the table)
I am getting the following error however:
Error: ORA-06550: line 1, column 14: PL/SQL: ORA-00904: "STATE_ID": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored performing List of Values query: "select STATE_ID d, STATE_ID v from STATE_ID_LOOKUP order by 1".
I have not entered any sql, just selected all of my options using defaults and dropdowns. What is causing the error and what do I need to change?
ThanksOkay, learned something: The database link name used, must not contain a dash. The DB_DOMAIN is appended automatically when you create a DB link, so if IT contains a dash, the db link name does as well. Check DBA_DB_LINKS to make sure you don't hit this well-hidden feature.
Regards
Martin Klier
[http://www.usn-it.de|http://www.usn-it.de] -
[0098]SQL*Plus encountered oracle error 100 while executing SQL Statement
Hi,
i'm trying to delete duplicate records from a table and running following script. this script is triggered from a unix script. it successfully deletes the records but in the last throws following error message,
:[0098]SQL*Plus encountered oracle error 100 while executing SQL Statement:2:Investigation required:
can anybody please help? below is the script.
DECLARE
--CURSOR FOR DUPLICATE ROWS
CURSOR CUR_DUPLICATE_ROWS IS
Select RMS_NOTE_ID, RMS_SUMMARY_NOTE_ID, count(*) cnt from PARTY_NOTE
group by RMS_NOTE_ID,RMS_SUMMARY_NOTE_ID having count(*) > 1;
var_date PARTY_NOTE.PARTY_NOTE_CREATED_DATE%TYPE;
BEGIN
FOR DUPLICATE_ROWS_REC IN CUR_DUPLICATE_ROWS
LOOP
delete from party_note
where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID
and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID
and rowid not in (select max(rowid) from party_note
where RMS_NOTE_ID= DUPLICATE_ROWS_REC.RMS_NOTE_ID and RMS_SUMMARY_NOTE_ID= DUPLICATE_ROWS_REC.RMS_SUMMARY_NOTE_ID);
commit;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ROLLBACK;
END;Try this:
delete party_note
where rowid not in (select max(rowid)
from party_note
group by rms_note_id, rms_summary_note_id
commit;No need for cursors and loops.
And when that's completed, consider ALTERing the table to add a unique index (or even a primary key) so you'll never need to do this again. -
Trying to produce report but have ERROR ORA-00900: invalid SQL statement
Hi,
I am new to Oracle so have been experimenting with a few things to get the hang of it. I have been trying to produce a report, but keep getting the error: ORA-00900: invalid SQL statement.
This happens at my first line of code where I have COLUMN <column_name> HEADING <Heading_name>
So I am a bit confused - is there a command that I am supposed to issue that indicates to SQL*Plus that I am trying to create a report?
Also, if I just delete the COLUMN <column_name> HEADING <Heading_name> rows and just start at BREAK ON <column_name> SKIP 1, it produces the same error.
I am using Oracle 8.0.6 - does this make a difference?
Here is my code:
COLUMN a.p_ctryid HEADING 'Country'
COLUMN s.p_animid HEADING 'Stallion ID'
COLUMN s.p_uname HEADING 'Stallion Name'
COLUMN a.p_animid HEADING 'Horse ID'
COLUMN d.p_careertp HEADING 'Career'
BREAK ON s.p_animid SKIP 1
BREAK ON d.p_careertp SKIP 2
COMPUTE SUM LABEL 'Total' OF d.p_careertp ON REPORT
SELECT DISTINCT a.p_ctryid, s.p_animid, s.p_uname, a.p_animid, d.p_careertp
FROM p_owby.p_animal a, p_owby.p_animal s, p_owby.p_mating m, p_owby.p_anim_dtl d
WHERE m.p_mateyr = 2001
AND a.p_animid = d.p_animid
AND a.p_animid = m.p_animid
AND a.p_animid > 0
AND s.p_animid = a.p_sire
AND a.p_ctryid IN('GB','IRE')
GROUP BY a.p_ctryid, s.p_animid, s.p_uname, d.p_careertp, a.p_animid
ORDER BY a.p_ctryid, s.p_animid, d.p_careertp
Any help would be greatly appreciated!
Thanks in advance!You are trying to do COMPUTE SUM ... ON REPORT but there is no BREAK ON REPORT specified. The computed sum will not be shown unless you also break on report. see below demonstration. first select has no sum even though we have specified COMPUTE. The second select shows the sum since now we have done break on report.
SQL> compute sum of sal on report
SQL> select * from scott.emp order by empno ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
14 rows selected.
SQL> break on report
SQL> select * from scott.emp order by empno ;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-1980 800 20
7499 ALLEN SALESMAN 7698 20-FEB-1981 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-1981 1250 500 30
7566 JONES MANAGER 7839 02-APR-1981 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-1981 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-1981 2850 30
7782 CLARK MANAGER 7839 09-JUN-1981 2450 10
7788 SCOTT ANALYST 7566 19-APR-1987 3000 20
7839 KING PRESIDENT 17-NOV-1981 5000 10
7844 TURNER SALESMAN 7698 08-SEP-1981 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-1987 1100 20
7900 JAMES CLERK 7698 03-DEC-1981 950 30
7902 FORD ANALYST 7566 03-DEC-1981 3000 20
7934 MILLER CLERK 7782 23-JAN-1982 1300 10
sum 29025
14 rows selected.
SQL> -
SQL Error 58004. Executed SQL Statement
Hi experts, we working with SAP-MAM 3.0 database DB2E Version 9.1.2 , when I try install the MAM30 show me this message.
Please, Can i reinstall the DB2E application for fix this error, or there are other solution?
u2022 Excepción al tratar el métodoSMARTSYNC : com.sap.ip.me.spi.persist.IPersistenceException: char processor: SQL Error 58004. Executed SQL statement: [INSERT INTO M8_PROPERTIES("KEY","VALUE") values ('KEY_INCONSISTENT_DATA','X')] : char processor: SQL Error 58004. Executed SQL statement: [INSERT INTO M8_PROPERTIES("KEY","VALUE") values ('KEY_INCONSISTENT_DATA','X')]
u2022 java.lang.RuntimeException: SQLState:58004, error code:-1 : SQLState:58004, error code:-1
u2022Moved thread to DB6 forum.
-
Very Urgent: Apexlib error ora-00900 invalid sql statement
Hi,
If i'm opening a page where there are LOV I get the strange error in the debug mode. Has it perhaps anything to do with grants?
pls help asap if you can
Read report column mapping(ApexLib_TabForm.init)
...processing Interface execution selection
...ignore validation = NO
Get column list(ApexLib_Sql.getColumnList)
...parse query = 獥汥捴 䥎呅剆䅃䕟䑁呅Ⰺ䥎呅剆䅃䕟䑁呅⁉乔䕒䙁䍅彄䅔䕟䑉卐䱁夬ੈ佒䥚低彂䰬䕐彂䰊晲潭⁆䕐彉乔䕒䙁䍅彃䅌䕎䑁刊睨敲攠楮瑥牦慣敟摡瑥整睥敮慳瑟摡礨慤摟浯湴桳⡴潟摡瑥⠺倱㥟捡汥湤慲彤慴攬❙奙奍䵄䐧⤬ⴱ⤩⬱⁁乄⁌慳瑟摡礨瑯彤慴攨㩐ㄹ彣慬敮摡牟摡瑥Ⱗ奙奙䵍䑄✩⤊潲摥爠批‱
ORA-00900: invalid SQL statementHi Irvine74,
for ApexLib problems it's better to use the related SourceForge support forum at http://sourceforge.net/forum/?group_id=184339 , because I'm not always monitoring the OTN forum.
Are you only getting the error in debug mode?
Is your report query on that page a valid SQL statement?
If you comment out the PL/SQL code with /* */ (don't forget to add a NULL; statement at the end to have a valid region) on page 0 "ApexLib - Before footer", are you now getting an error from APEX that the statement isn't valid?
Patrick
My APEX Blog: http://inside-apex.blogspot.com
The ApexLib Framework: http://apexlib.sourceforge.net
The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/ -
Error when generating the SQL statement while running the Query
Hello SDN Mates,
Am using three cubes in one infoset and build a query on that. Intially it was running fine, but now am getting error generating the SQL statement. Can you please throw some light on this. Your idea would be highly appreciated.
Thanks and Regards
Arun SHi Arun
is there any change in the objects (Check also the consistency of infoobject ) included in infoset, just make sure those are active, open the query in designer and check if no error/warning message are present
Thanks
Tripple k -
Error log related to SQL statement
Hi SCNites,
In sm21 there is a particular log related to SQL statement, ( error in preparedstatement ). based on this log, i checked the relavent Wp and found these statements.
C Tue Jul 22 01:40:46 2014
C *** ERROR in prepareStatement[dbdb6.c, 15027] CON = 0 (BEGIN)
C &+ dsql_db6_exec( SQLExtendedPrepare ): [IBM][CLI Driver][DB2/NT64] SQL0204N "SAPSID.DB2CLINETSTATS" is an undefined
C &+ name. SQLSTATE=42704
C &+
C &+ DELETE FROM DB2CLINETSTATS WHERE intervalend < current timestamp - 7 days
C &+ cursor type=NO_HOLD, isolation=UR, cc_release=YES, optlevel=5, degree=1, op_type=8, read_only=0
C &+ ABAP location info: 'CL_SQL_STATEMENT==============CP', 975
C &+
C &+ ABAP location info 'CL_SQL_STATEMENT==============CP', 975
C &+
C *** ERROR in prepareStatement[dbdb6.c, 15027] (END) ".
Could some tell me where exactly the error is triggering and how to troubleshoot this.
Thanks in Advance
Rgds,
vamc.Hi Vamsi,
Please have a look into solution described in SAP note
Note 1706054 - DB6: Collector error SQL0204N SAPTOOLS.DBH_CURR_HOSTNAME
Note 1554750 - DB6: SQL0204N when accessing a view over an existing table
Hope this helps.
Regards,
Deepak Kori -
Sql error ORA-00900: invalid SQL statement
Hi All
I am new to sql and i try to solve this issue i have here.
where i run this query (1) i get this message : ORA-00900: invalid SQL statement
Query : 1
WITH t1
AS (SELECT CID ,
TYPE,
TO_CHAR (
TO_DATE ('00:00:00', 'HH24:MI:SS')
+ (lg_end_time - lg_start_time),
'HH24:MI:SS') call_time,
ROW_NUMBER ()
OVER (PARTITION BY CID ORDER BY CID NULLS FIRST)
AS call_id1
FROM test_1
SELECT SUM (call_time)
FROM t1;
output:
i get error: ORA-01722: invalid number
table structure:
select * form test_1;
CID TYPE LG_END_TIME LG_START_TIME
1508643 Dispatching 2012/12/03 14:05 2012/12/03 14:02
1508643 Treatment 2012/12/03 14:00 2012/12/03 14:00
1508643 Initiation 2012/12/03 14:00 2012/12/03 14:00
1508662 Dispatching 2012/12/03 14:18 2012/12/03 14:16
1508662 Initiation 2012/12/03 14:01 2012/12/03 14:01
1508662 Treatment 2012/12/03 14:02 2012/12/03 14:01
1508643 Dispatching 2012/12/03 14:02 2012/12/03 14:00
1508662 Dispatching 2012/12/03 14:16 2012/12/03 14:02
thanks for all your helpHi All
thanks for helping and giving your support. but the at this time question remains unanswered.
with t1
as (
SELECT CID ,
TYPE,
TO_CHAR (
TO_DATE ('00:00:00', 'HH24:MI:SS')
+ (lg_end_time - lg_start_time),
'HH24:MI:SS') call_time,
ROW_NUMBER ()
OVER (PARTITION BY CID ORDER BY CID NULLS FIRST)
AS call_id1
FROM test_1
select * from t1Output:
CID TYPE CALL_TIME CALL_ID1
1508643 Dispatching 0:02:06 1
1508643 Initiation 0:00:00 2
1508643 Treatment 0:00:39 3
1508643 Dispatching 0:02:50 4
1508662 Treatment 0:01:03 1
1508662 Initiation 0:00:00 2
1508662 Dispatching 0:13:17 3
1508662 Dispatching 0:02:43 4Desired results would be :
group by CID and total time (summed) by each CID
and it will also look like:
CID TYPE CALL_TIME CALL_ID1 total_time
1508643 Dispatching 0:02:06 1
1508643 Initiation 0:00:00 2
1508643 Treatment 0:00:39 3
1508643 Dispatching 0:02:50 4
0:05:35
1508662 Treatment 0:01:03 1
1508662 Initiation 0:00:00 2
1508662 Dispatching 0:13:17 3
1508662 Dispatching 0:02:43 4
0:17:03
Create table :
CREATE TABLE TEST_1
( CID NUMBER NOT NULL,
TYPE VARCHAR2(20 BYTE) NOT NULL,
LG_END_TIME DATE NOT NULL,
LG_START_TIME DATE NOT NULL
Insert statement:
insert into test_1 VALUES (1508643,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Treatment,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Initiation,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Initiation,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Treatment,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508643,Dispatching,03-DEC-12,03-DEC-12);
insert into test_1 VALUES (1508662,Dispatching,03-DEC-12,03-DEC-12);Edited by: 855161 on Jan 7, 2013 8:37 AM
Edited by: 855161 on Jan 7, 2013 9:15 AM
Edited by: 855161 on Jan 7, 2013 1:00 PM -
Here is tthe code:
begin
declare
p varchar2(32767) := null;
l_clob clob;
l_length number := 1;
begin
p:=p||'F|#OWNER#:QS_SPECIFICHHNO:P2_HHNO:HHNO';
wwv_flow_api.create_page_process(
p_id => 1223125545905315 + wwv_flow_api.g_id_offset,
p_flow_id=> wwv_flow.g_flow_id,
p_flow_step_id => 2,
p_process_sequence=> 1,
p_process_point=> 'AFTER_SUBMIT',
p_process_type=> 'DML_FETCH_ROW',
p_process_name=> 'Fetch Row from QS_SPECIFICHHNO',
p_process_sql_clob => p,
p_process_error_message=> 'Unable to fetch row.',
p_process_success_message=> '',
p_process_is_stateful_y_n=>'N',
p_runtime_where_clause=>'WHERE ( ( (HHNO) = P2_HHNO ) )',
p_process_comment=>'');
end;
null;
end;
I execute it as follows in SQL Developer:
select * from QS_SPECIFICHHNO
WHERE ( ( (HHNO) = &P2_HHNO ) )
No problem: I receive exactyl one row in my result set which is what I expect.
I think (definitely correct me if I am wrong) Apex is complaining about the following line of code:
p:=p||'F|#OWNER#:QS_SPECIFICHHNO:P2_HHNO:HHNO';
It is complaining about a missing expession line 1 ccolumn 9 - |#OWNER#:
This is an Automatic Fetch query. P2_HHNO is a simple text field where the user enters a primary key value (Household Number)
The household number is used in the where clause of the QS_SPECIFICHHNO view.
Here is the view:
CREATE OR REPLACE FORCE VIEW "CASETRANS"."QS_SPECIFICHHNO" ("HHNO","CNAME","PDATE","TDATE","AGE","INWORKNO","ONWORKNO","ONCPS","ONYTHSRV","CPA","TMSUCCESS","VOL","D_N","DLQ","TRU","VPA","PA5","PA46","CPC","COOHPA4","COOHPA5","KINPA5","KINPA4","COOH","CKIN") AS
SELECT HHNO,
CNAME,
PDate,
TDate,
msaccess_utilities.datediff('d', PDate, TDate, 0) Age,
InWorkNo,
OnWorkNo,
OnCPS,
OnYthSrv,
CPA,
TmSuccess,
Vol,
D_N,
DLQ,
TRU,
VPA,
PA5,
PA46,
CPC,
COOHPA4,
COOHPA5,
KINPA5,
KINPA4,
COOH,
CKIN
FROM CaseTransfers
ORDER BY CaseTransfers.HHNo,
CaseTransfers.PDate DESC'F|#OWNER#:QS_SPECIFICHHNO:P2_HHNO:HHNO'
Is perfectly valid, it is an APEX DML string
F = Fetch
#OWNER# = the schema from the workspace
QS_SPECIFICHHNO = the table/view
P2_HHNO = The APEX item to match with the key
HHNO = The key in the table/view
The p_runtime_where_clause appears to be invalid;
a) The "WHERE" keyword is not necessary, also it should be '&P2_HHNO.' not '&P2_HHNO'
b) The record should have already matched using the DML string
Try deleting the runtime_where_clause, it should then work.
regards, -
Why is the clause marked red giving error - unexpected end of sql statement
INSERT INTO APP_PUBLICATION
(DESCRIPTION1,
NU,
NT,
CANADA)
SELECT
DISTINCT(APP_NPS_GROUP_DESC),
(select 0 from ape_summary_a where app_nps_group_desc = a.app_nps_group_desc and province_code != 'B'),
(select 0 from ape_summary_a where app_nps_group_desc = a.app_nps_group_desc and province_code != 'B'), (select 0 from ape_summary_a where app_nps_group_desc = a.app_nps_group_desc and province_code IN('B')
FROM ape_summary_a a ;I believe you are missing a parenthesis from the last select statement
INSERT INTO APP_PUBLICATION
(DESCRIPTION1,
NU,
NT,
CANADA)
SELECT
DISTINCT(APP_NPS_GROUP_DESC),
(select 0 from ape_summary_a where app_nps_group_desc = a.app_nps_group_desc and province_code != 'B'),
(select 0 from ape_summary_a where app_nps_group_desc = a.app_nps_group_desc and province_code != 'B'), (select 0 from ape_summary_a where app_nps_group_desc = a.app_nps_group_desc and province_code IN('B') )
FROM ape_summary_a a ;
Shakti
http://www.impact-sol.com
Developers of Guggi Oracle - Tool for DBAs and Developers -
Strange error while execute PL/SQL
Hi All,
I am execting a procedure from user (say USER1) who is having the DBA role granted.
Its getting the errors while creation:
SQL> show errors
Errors for PROCEDURE DISP_DBLOCKS:
LINE/COL ERROR
8/11 PLS-00341: declaration of cursor 'DBLOCK_CURSOR' is incomplete or
malformed
10/8 PL/SQL: SQL Statement ignored
34/15 PL/SQL: ORA-00942: table or view does not exist
42/17 PL/SQL: Item ignored
54/8 PL/SQL: SQL Statement ignored
56/16 PL/SQL: ORA-00942: table or view does not exist
79/8 PL/SQL: SQL Statement ignored
79/33 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
LINE/COL ERROR
82/8 PL/SQL: Statement ignored
82/27 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
But If I execute the same procedure from SYS user, its got created without any errors.
The procedure is using tables SYS.V$LOCK L, SYS.V$SESSION S, SYS.V$PROCESS P, SYS.USER$ U, SYS.OBJ$ T and shows the locking info for DB.
Please let me know if I am missing something and also how to resolve this issue.
Thanks in advanced
BhupinderORA-00942: table or view does not existbecause u don't have permission on some tables
check it by manual issue select from these tables by new user
Maybe you are looking for
-
Additional Alias created - not by me - can't get rid of it!
My husband and I have a .Mac account and we set that up fine. We've also added two aliases (one for me and one for my husband). So, now we have 3 e-mail addresses, our family address and then a personal e-mail address for both of us. We set up folder
-
I'm sure I futzed with a setting or something----the viewer in my Mail App is gone. I can still view my email by double-clicking on it, then it opens in a new window. But how do I return it to viewing my email integrated with my list of emails. make
-
JAVA + ACCESS + MYSQL + ENCODING!!!!
i have to migrate some data from access to mysql. however, i have some japanese characters in the access table and whenever i am done w/ migration and open the mysql table, i see bunch of ?????? instead japanese character. since im now working for a
-
Another Boolean formula in BW 3.5
Hello, Again I'm sorry for asking questions about formula, but I'm having real problems with this =IF((-A-B)>0,IF(((-A-B-C-D)/(-A-B))<30%,(-A-B-C-D)/(-A-B),""),"") and getting it into boolean logic. I've tried breaking the two IF calculations and cre
-
Problems with Apache Proxy to 3 clustered domains....
I have 3 different domains (qa, stage, production) running on weblogic 81. I am trying to get Apache to route to the correct domains. ie... http://192.XXX.XXX.XXX/qa/application connects to 192.XXX.XXX.XX2:7001/application http://192.XXX.XXX.XXX/stag