Friday, June 29, 2007

Extract columns from microsoft SqlProfileProvider

If you want to select data from the membership api database but you are having problems because the PropertyValuesString / PropertyNames / PropertyValuesBinary values are all delimited / separated by a colon but you want to but cant use a split function on it. Below is a solution. There are also UserId LastUpdatedDate columns.

Step 1. Execute the sql from HERE to create some functions to extract your data.
Step 2. Create a view like the example below
Step 3. (optional) index your view.

create my_cusomers_vw view as
dbo.fn_GetProfileElement('Phone',PropertyNames,PropertyValuesString) AS Company,
dbo.fn_GetProfileElement('ZipCode',PropertyNames,PropertyValuesString) AS ZipCode,
dbo.fn_GetProfileElement('State',PropertyNames,PropertyValuesString) AS State
FROM dbo.aspnet_Profile

select * from my_customers_vw


fn_GetElement fn_GetProfileElement FUNCTION


At 9:07 AM, Blogger senfo said...

Cool stuff. You should change the subject of the post to indicate that it's for the SqlProfileProvider, which is actually separate from the membership provider.

At 9:14 PM, Blogger James Taylor said...

I believe the line

create my_cusomers_vw view as

should be

create view my_cusomers_vw as

At 4:40 AM, Blogger ambersbridal said...

A holy church, rings, a bouquet, a 3-floor wedding cake, lace wedding dress
champagne, and the moving promise “ I do”, make up the happiest moment in one’s life. Then it is the wedding.
lace wedding gowns
A gorgeous wedding dress has been inside a girl’s dream since she was five years old. It is widely said that the bride is the most beautiful woman all over the world.
Bridal gowns vary in different parts of the world. For example, cheap wedding dresses plus sizein traditional Chinese culture, the color red is regarded for centuries as the symbol of good luck; while in the Occident, wedding dresses 2012 a full-length white wedding dress is always associated with romance and sanctity. But, with the globalization, wedding dresses tend to be alike in the whole world.

At 5:17 AM, Blogger hou said...

If you want to select data from the membership api database but you are having problems because the PropertyValuesString.
xiaomi mi5 review
meizu m2 note
meizu mx5


Post a Comment

<< Home