added new get quote items function for use in the quote accept/reject views and pages.

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3243 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
mullenm
2008-01-15 11:41:09 +00:00
parent c66351616c
commit 5e4fd6a160
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
create or replace function get_quote_items(p_quote_id in number) return varchar2 is
ret_items varchar2(250);
first_item BOOLEAN := TRUE;
BEGIN
--blank string
ret_items := '';
FOR cur_item IN (SELECT * FROM quote_items quit
WHERE quit.qute_id = p_quote_id
AND quit.adit_code IS NOT NULL) LOOP
IF first_item THEN
ret_items := cur_item.adit_code;
first_item := FALSE;
ELSE --add a seperator
ret_items := ret_items ||', '|| cur_item.adit_code;
END IF;
END LOOP;
return(ret_items);
EXCEPTION
WHEN OTHERS THEN
--return an empty string just in case
RETURN(NULL);
end get_quote_items;
/