Skip to main content

Posts

Showing posts from 2011

Parse Property values from Oracle Profile Provider Schema

Recently we had the need to pull user profile information independent of the Microsoft provider framework. The property values are stored in a table that contains a "PropertyNames" field with meta information on the start position and length of the property value being stored. This self-describing storage method is pretty slick but attempting to use the built in wrapped function for retrieving the property values proved to be more challenging than simply writing our own parser. There are two SQL functions. They are used in this way: SELECT p.USERID, m.EMAIL, GETPROFILEELEMENT('FirstName', PropertyNames, PropertyValuesString) AS FirstName, GETPROFILEELEMENT('LastName', PropertyNames, PropertyValuesString) AS LastName FROM ora_aspnet_profile p, ora_aspnet_membership m WHERE p.USERID = m.USERID Here are the functions: CREATE OR REPLACE FUNCTION ASPNET_DB_USER."GETPROFILEELEMENT" ( fieldName IN VARCHAR2, ...