Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Scripts and [vw_Profile] #8

Open
Joezyz opened this issue Oct 26, 2018 · 5 comments
Open

Issues with Scripts and [vw_Profile] #8

Joezyz opened this issue Oct 26, 2018 · 5 comments

Comments

@Joezyz
Copy link

Joezyz commented Oct 26, 2018

Tried to run DNN TurboUnSchema Version 0.9.9 (2018-09-23) and having issues.
There are problems with the [vw_Profile] script. I changed the script to fix the errors.

CREATE VIEW [dbo].[vw_Profile]

AS
SELECT
P.UserID,
P.PortalID,
P.PropertyName,
CASE
WHEN P.TypeName = N'List' THEN IsNull(L.[Text], P.PropertyValue)
WHEN P.TypeName IN (N'Region', N'Country') THEN IsNull(M.[Text], M.[Value])
WHEN IsNull(P.PropertyText, N'') = N'' THEN IsNull(P.PropertyText, P.PropertyValue)
ELSE P.PropertyText
END AS PropertyValue,
P.Visibility,
P.ExtendedVisibility,
P.Deleted,
P.DataType,
P.TypeName,
P.LastUpdatedDate,
P.PropertyDefinitionID
FROM dbo.[vw_ProfileBase] AS P
LEFT JOIN dbo.[Lists] AS L ON P.PropertyName = L.ListName AND P.PropertyValue = L.Value
LEFT JOIN dbo.[Lists] AS M ON P.PropertyValue = CAST(M.EntryID as varchar)

GO

The original was
LEFT JOIN {databaseOwner}[{objectQualifier}Lists] AS M ON Cast(P.PropertyValue AS Int) = M.EntryID

The
Cast(P.PropertyValue AS Int) was causing the problem.

@sleupold
Copy link
Contributor

Thank you for reporting it, I will fix it in next release (using the calculated column instead)

@Joezyz
Copy link
Author

Joezyz commented Oct 27, 2018 via email

@sleupold
Copy link
Contributor

sleupold commented Oct 28, 2018

Joe,
Yyou may contact me via support (at) dnnwerk.de, response may be a bit slower atm, because I am not in the office atm. are you using default values for databaseOwner and objectQualifier placeholders ("dbo." and "" - empty string)?

@Joezyz
Copy link
Author

Joezyz commented Oct 28, 2018 via email

@sleupold
Copy link
Contributor

@Joezyz
You should run latest TurboDNN followed by TurboSchema sxript, this should solve all your problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants