•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Oracle section within the Web Development category of DaniWeb, a massive community of 456,608 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,456 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Oracle advertiser: Programming Forums
Views: 1343 | Replies: 2 | Solved
![]() |
•
•
Join Date: Nov 2006
Posts: 22
Reputation:
Rep Power: 2
Solved Threads: 0
Greetings,
I'm having a heck of a time trying to get this pl/sql program to work. I'm to invoke it using shopper id and then again by shopper last name. I've banged my head on this for a while now and it seems that every change I make creates more problems. Here is my code, and i'll also include the error message. thanks
show errors
Errors for PACKAGE BODY SHOP_QUERY_PKG:
LINE/COL
ERROR
12/4
PL/SQL: SQL Statement ignored
13/9
PLS-00403: expression 'P_ID' cannot be used as an INTO-target of a SELECT/FETCH statement
14/4
PL/SQL: ORA-00913: too many values
26/6
PL/SQL: SQL Statement ignored
27/9
PLS-00403: expression 'P_NAME' cannot be used as an INTO-target o f a SELECT/FETCH statement
28/4
PL/SQL: ORA-00913: too many values
BTW, what do you use in the wrap code fields? I tried SQL and oracle. thanks
I'm having a heck of a time trying to get this pl/sql program to work. I'm to invoke it using shopper id and then again by shopper last name. I've banged my head on this for a while now and it seems that every change I make creates more problems. Here is my code, and i'll also include the error message. thanks
CREATE OR REPLACE PACKAGE shop_query_pkg IS
PROCEDURE shopper_search_pp
(P_id IN bb_shopper.IDSHOPPER%TYPE,
p_name OUT bb_shopper.LASTNAME%TYPE,
p_city OUT bb_shopper.CITY%TYPE,
p_state OUT bb_shopper.STATE%TYPE,
p_pnum OUT bb_shopper.PHONE%TYPE,
p_email OUT bb_shopper.EMAIL%TYPE);
PROCEDURE shopper_search_pp
(p_name IN bb_shopper.LASTNAME%TYPE,
p_id OUT bb_shopper.IDSHOPPER%TYPE,
p_city OUT bb_shopper.CITY%TYPE,
p_state OUT bb_shopper.STATE%TYPE,
p_pnum OUT bb_shopper.PHONE%TYPE,
p_email OUT bb_shopper.EMAIL%TYPE);
END;
/
CREATE OR REPLACE PACKAGE BODY shop_query_pkg
IS
PROCEDURE shopper_search_pp
(p_id IN bb_shopper.IDSHOPPER%TYPE,
p_name OUT bb_shopper.LASTNAME%TYPE,
p_city OUT bb_shopper.CITY%TYPE,
p_state OUT bb_shopper.STATE%TYPE,
p_pnum OUT bb_shopper.PHONE%TYPE,
p_email OUT bb_shopper.EMAIL%TYPE)
IS
BEGIN
SELECT LASTNAME, CITY, STATE, PHONE, EMAIL
INTO p_id, p_name, p_city, p_state, p_pnum, p_email
FROM bb_shopper
WHERE IDSHOPPER = p_id;
END;
PROCEDURE shopper_search_pp
(p_name IN bb_shopper.LASTNAME%TYPE,
p_id OUT bb_shopper.IDSHOPPER%TYPE,
p_city OUT bb_shopper.CITY%TYPE,
p_state OUT bb_shopper.STATE%TYPE,
p_pnum OUT bb_shopper.PHONE%TYPE,
p_email OUT bb_shopper.EMAIL%TYPE)
IS
BEGIN
SELECT IDSHOPPER, CITY, STATE, PHONE, EMAIL
INTO p_name, p_id, p_city, p_state, p_pnum, p_email
FROM bb_shopper
WHERE LASTNAME = p_name;
END;
END;
/
show errors
Errors for PACKAGE BODY SHOP_QUERY_PKG:
LINE/COL
ERROR
12/4
PL/SQL: SQL Statement ignored
13/9
PLS-00403: expression 'P_ID' cannot be used as an INTO-target of a SELECT/FETCH statement
14/4
PL/SQL: ORA-00913: too many values
26/6
PL/SQL: SQL Statement ignored
27/9
PLS-00403: expression 'P_NAME' cannot be used as an INTO-target o f a SELECT/FETCH statement
28/4
PL/SQL: ORA-00913: too many values
BTW, what do you use in the wrap code fields? I tried SQL and oracle. thanks
•
•
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,445
Reputation:
Rep Power: 4
Solved Threads: 87
![]() |
•
•
•
•
•
•
•
•
DaniWeb Oracle Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Code 19 Registry Error (Windows NT / 2000 / XP / 2003)
- Error Loading operating System (Windows NT / 2000 / XP / 2003)
- svchost.exe error (Windows NT / 2000 / XP / 2003)
- New Hardware Causing Error (Windows NT / 2000 / XP / 2003)
- office 2000 install error (Windows NT / 2000 / XP / 2003)
- VMWare Unrecoverable Error (*nix Software)
- Error in Wrox Book (Perl)
Other Threads in the Oracle Forum
- Previous Thread: help me for this query
- Next Thread: Create a view as superuser



Linear Mode