All, I am a beginner to learn Pl/ SQL. How can I return either " Return Pl/SQL table" or "Return VARCHAR2" simultaneously? The result is dependable on Count(Last_name) condition.
Thanks, The below is incomplete because I cannot understand the above question. =========================================================== create or replace function New_Rental( P_last_name S_member.LAST_NAME%TYPE, P_member_id S_member.Member_id%TYPE, P_first_name S_member.FIRST_NAME%TYPE, P_phone S_member.Phone%TYPE, P_VALID_DATE In OUT Date) Return VARCHAR2 Is V_msg :='Expected due date is'||P_VALID_DATE; Begin If Count(Last_name)=1 then Select VALID_DATE INTO P_VALID_DATE from S_member Where Last_Name:= P_Last_name; return 'Expected due date is'||P_VALID_DATE; ElSIF Count(Last_name)> 1 then Select VALID_DATE INTO P_VALID_DATE from S_member Where Last_name:=P_last_name And Member_id:= P_member_id; return 'Expected due date is'||P_VALID_DATE||'Person's record as follows:'||P_last_name,P_first_name, P_phone, P_member_id ; Else Count(Last_name)=0 return 'This person needs to be registered as a member' End If; End New_Rental; ====================================================================== ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly