Saturday, January 19, 2008

Oracle 10g: Initcap

/*
How to create Initial capital letter for each selected field....
*/

SELECT org.orgid, org.orgname, refdoctype.typedescription doctype,org.orgdocno
FROM gbl_organization_mst org, gbl_refcode refdoctype
WHERE (
(Initcap(org.orgname) LIKE '%' || ORGNAME_ || '%')
AND (org.orgdoctype = refdoctype.typeid)
);

No comments: