ASP.net With Oracle
-
Hi all..... This is my oracle statement...while executing its giving an error: 21/29 PL/SQL: ORA-00923: FROM keyword not found where expected please help me to solve this issue.. its urgent... create or replace PROCEDURE PEAP_SelectEmpAppraiser ( AppraiserID IN VARCHAR2 DEFAULT NULL, Cur_RCT1 OUT GLOBALPKG.RCT1 ) AS BEGIN EXECUTE IMMEDIATE 'TRUNCATE TABLE PEAP_SelectEmployeesByApr'; INSERT INTO PEAP_SelectEmployeesByApr SELECT emp_code AS EmployeeID, emp_code || ' ' || l_name || ' ' || f_name AS SurNameFirstName FROM emp_master WHERE (Appraiser = PEAP_SelectEmpAppraiser.AppraiserID); Insert into PEAP_SelectEmployeesByApr SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not in ( select EmployeeID from PEAP_SelectEmployeesByApr); OPEN Cur_RCT1 FOR SELECT DISTINCT EmployeeID, SurNameFirstName FROM PEAP_SelectEmployeesByApr; END; /
-
Hi all..... This is my oracle statement...while executing its giving an error: 21/29 PL/SQL: ORA-00923: FROM keyword not found where expected please help me to solve this issue.. its urgent... create or replace PROCEDURE PEAP_SelectEmpAppraiser ( AppraiserID IN VARCHAR2 DEFAULT NULL, Cur_RCT1 OUT GLOBALPKG.RCT1 ) AS BEGIN EXECUTE IMMEDIATE 'TRUNCATE TABLE PEAP_SelectEmployeesByApr'; INSERT INTO PEAP_SelectEmployeesByApr SELECT emp_code AS EmployeeID, emp_code || ' ' || l_name || ' ' || f_name AS SurNameFirstName FROM emp_master WHERE (Appraiser = PEAP_SelectEmpAppraiser.AppraiserID); Insert into PEAP_SelectEmployeesByApr SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not in ( select EmployeeID from PEAP_SelectEmployeesByApr); OPEN Cur_RCT1 FOR SELECT DISTINCT EmployeeID, SurNameFirstName FROM PEAP_SelectEmployeesByApr; END; /
This is complex enough that I would break it down. Type it in one part at a time until you find where the error is. This also has nothing to do with ASP.NET, so it belongs in the SQL forum.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
Hi all..... This is my oracle statement...while executing its giving an error: 21/29 PL/SQL: ORA-00923: FROM keyword not found where expected please help me to solve this issue.. its urgent... create or replace PROCEDURE PEAP_SelectEmpAppraiser ( AppraiserID IN VARCHAR2 DEFAULT NULL, Cur_RCT1 OUT GLOBALPKG.RCT1 ) AS BEGIN EXECUTE IMMEDIATE 'TRUNCATE TABLE PEAP_SelectEmployeesByApr'; INSERT INTO PEAP_SelectEmployeesByApr SELECT emp_code AS EmployeeID, emp_code || ' ' || l_name || ' ' || f_name AS SurNameFirstName FROM emp_master WHERE (Appraiser = PEAP_SelectEmpAppraiser.AppraiserID); Insert into PEAP_SelectEmployeesByApr SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not in ( select EmployeeID from PEAP_SelectEmployeesByApr); OPEN Cur_RCT1 FOR SELECT DISTINCT EmployeeID, SurNameFirstName FROM PEAP_SelectEmployeesByApr; END; /
SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not in ( select EmployeeID collate database_default from PEAP_SelectEmployeesByApr) Error: PL/SQL: ORA-00923: FROM keyword not found where expected
-
SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not in ( select EmployeeID collate database_default from PEAP_SelectEmployeesByApr) Error: PL/SQL: ORA-00923: FROM keyword not found where expected
Why do you need collate database_default ? What if you remove it ? You really should move this to the right forum. And if you want to reply to me, you should reply to me, not to yourself.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
-
SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not in ( select EmployeeID collate database_default from PEAP_SelectEmployeesByApr) Error: PL/SQL: ORA-00923: FROM keyword not found where expected
sandhya14 wrote:
SELECT emp_code as EmployeeID ,emp_code || ' ' || l_Name || ' ' || f_Name AS SurNameFirstName FROM emp_master WHERE ( Reporting_To = PEAP_SelectEmpAppraiser.AppraiserID) and isnull ( Appraiser , '') = '' and emp_code not
I assume that the Reporting_To, Appraiser and emp_code columns belong to emp_master table. Also you are comparing Reporting_To column to the column of PEAP_SelectEmpAppraiser table. But this table is not in the FROM clause.
-
Why do you need collate database_default ? What if you remove it ? You really should move this to the right forum. And if you want to reply to me, you should reply to me, not to yourself.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.