?
orus casino
?
bodog
?
ruleta
?
luckia
?
betano
?
sportium
?
spin casino
?
stakes
?
3 reyes
?
888
?
lottoland
?
coolbet
?
777 casino
?
gana777
?
betfair
?
bwin
?
yak casino
?
ivy casino
?
oddschecker
?
red casino
?
netbet
?
william hill
?
vip casino
?
rey casino
?
marathonbet
?
dafabet
?
sol casino
?
1bet
?
winland
?
bet777
?
parimatch
?
18bet
?
888casino
?
campobet
?
mostbet
?
ganabet
?
rushbet
?
betcris
?
betsson
?
lucky
?
novibet
?
winner
?
winpot
?
betmaster
?
betmexico
?
cancun
?
playcity
?
strendus
?
pokerstars
?
codere
?
caliente
?
fun88
?
bbrbet
?
1win
?
10bet
?
betway
?
pin up
?
spinbet
?
7cslot
?
pickwin
?
spin bet
?
mr fortune
?
w88
?
pragmatic
?
gamdom
?
crasher
?
jojobet
?
betmex
?
bcasino
?
foliatti
?
winner mx
?
bets 10
?
big bola
?
bet master
?
inbet
?
7slots
?
lucky day
?
m777
?
mexplay
?
luckydays
?
bet caliente
?
1x
?
plinko
Need
DNN Support
?
DeskPal.com
Learn DNN / DotNetNuke
Login
Subscribe to DNNCreative
Home
Subscribe
Training & Tutorials
Tutorials for Beginners
Tutorials for Administrators
Tutorials for Core Modules
Tutorials for Advanced Users
How to Build a Website in DotNetNuke
Skinning Tutorials
Module Development
Third Party Modules
Forum
Search
Search
Home
Subscribe
+
Training & Tutorials
Tutorials for Beginners
Tutorials for Administrators
Tutorials for Core Modules
Tutorials for Advanced Users
How to Build a Website in DotNetNuke
Skinning Tutorials
Module Development
Third Party Modules
Forum
You need to
Register
for free and
Login
to post a message in the forum.
Forum
Forums
Search Forum
Search
Advanced Search
Topics
Posts
Unanswered
Active Topics
Forums
>
DotNetNuke®
>
DotNetNuke® Questions
Need Help Joining two statments
Last Post 06/02/2013 11:51 PM by
Scot Price
. 2 Replies.
Sort:
Oldest First
Most Recent First
Check this box to subscribe to this topic.
Prev
Next
You are not authorized to post a reply.
Author
Messages
Scot Price
Nuke Newbie
Posts:1
05/22/2013 8:26 PM
Hi all I found this site after reading through an old post where Joseph Craig gave the answer I was looking for. Here is what I am asking:
I am attempting to make a report that shows only the user's Username, Firstname, Lastname, Email, Numerical, Street, Telephone, Committee and Volunteer Profile field values (from statement # 1 which shows everything fine but includes unauthorized members) who's accounts are authorized (statement #2 shows the accounts that are true from the Authorised column) so, I have two different statements That I have not been able to figure out how to join. Both statements work by them self, but I can not seem to join them together proerly. they are as follows:
Statements:
Statment#1
SELECT
u.UserName,
u.FirstName,
u.LastName,
u.Email,
Numerical.PropertyValue AS Numerical,
Street.PropertyValue AS Street,
Telephone.PropertyValue As Telephone,
Committee.PropertyValue AS Committee,
Volunteer.PropertyValue as Volunteer
FROM
dbo.udf_UserProfileField('unit') AS Numerical left OUTER JOIN dbo.vw_Users AS U on Numerical.PortalId = U.PortalId AND Numerical.UserID = U.UserId and Numerical.PropertyValue >= ' ' join
dbo.udf_UserProfileField('street') AS Street ON U.UserId = Street.UserID AND U.PortalId = Street.PortalId and Street.PropertyValue >= ' ' join
dbo.udf_UserProfileField('Telephone') AS Telephone ON U.UserId = Telephone.UserID AND U.PortalId = Telephone.PortalId and Telephone.PropertyValue >= ' ' join
dbo.udf_UserProfileField('Committee') AS Committee ON U.UserId = Committee.UserID AND U.PortalId = Committee.PortalId and Committee.PropertyValue >= ' ' Join
dbo.udf_UserProfileField('Volunteer') AS Volunteer on U.UserId = Volunteer.UserID AND U.PortalId = Volunteer.PortalId
and volunteer.PropertyValue >= ' '
Statement #2
SELECT Authorised from
UserPortals where Authorised='true'
This may seem to be juvenile stuff to a lot of you, but I haven't really messed with web design stuff since HTML. I would appreciate any help/advice that you can give to nudge me into the right direction. I do not even need to show the second statement. Just the fields from the first statement where users are approved.
we are using:
The DotNetNuke application you are running DotNetNuke Product:
DotNetNuke Community Edition
The DotNetNuke application version you are running DotNetNuke Version:
05.06.02 (144)
and the way I figured out the long statement for user defined fields was by running this script:
CREATE FUNCTION [dbo].[udf_UserProfileField]
(
@PropertyName NVARCHAR(50)
)
RETURNS @ProfileFieldTable TABLE
(
PortalId INT,
UserID INT,
PropertyName NVARCHAR(50),
PropertyValue NVARCHAR(3750)
)
AS BEGIN
INSERT INTO @ProfileFieldTable
SELECT PPD.PortalID,
UP.UserID,
PPD.PropertyName,
UP.PropertyValue
FROM dbo.Users AS U
INNER JOIN dbo.UserProfile AS UP ON U.UserID = UP.UserID
INNER JOIN dbo.ProfilePropertyDefinition AS PPD ON UP.PropertyDefinitionID = PPD.PropertyDefinitionID
WHERE ( PPD.PropertyName = @PropertyName )
RETURN
END
Joseph Craig
DNN MVP
Posts:11667
06/02/2013 12:43 PM
Scot,
I will get back to you on this. If you don't hear from me withing a week, please remind me.
This is actually complicated stuff, not simple.
Joe Craig,
Patapsco Research Group
Complete DNN Support
Scot Price
Nuke Newbie
Posts:1
06/02/2013 11:51 PM
Joseph, Just the man I was looking for. Let me start off by saying Thank You! I have found most of the answers to my questions by reading through the help you have given others. I hope you didn't start working on figuring it out yet. I had trouble posting this question and figured it did not post. I figured out what I was looking for after many hours of testing. I took over the programing for a site after it was mostly abandoned. When I started I only knew how to write HTML script that I haven't used for 10+ years, so you have been an inspiration and big help without even knowing it. Below is the answer(s) I was looking for in a few different forms, hopefully it will help others.
Thank you once again,
Scott Price
This version returns all the authorized members without showing the authorized category:
SELECT
Username,
FirstName,
LastName,
Email,
Numerical.PropertyValue AS Numerical,
Street.propertyValue as Street,
Telephone.PropertyValue As Telephone,
Committee.PropertyValue AS Committee
FROM
Users
Right Join dbo.udf_UserProfileField('Unit') as Numerical on Numerical.UserID = Users.UserId and Numerical.PropertyValue >= ' '
Right Join dbo.udf_UserProfileField('Street') as Street on Street.UserId = Users.UserID and Street.PropertyValue >= ' '
Right Join dbo.udf_UserProfileField('Telephone') as Telephone on Telephone.UserId = Users.UserID AND Telephone.PropertyValue >= ' '
Right Join dbo.udf_UserProfileField('Committee') as Committee on Committee.UserID = Users.UserID and Committee.PropertyValue >= ' '
Right Join dbo.UserPortals on UserPortals.Userid = Users.Userid where UserPortals.Authorised='True'
This version shows the same but with the authorized category showing true and false:
SELECT
Username,
FirstName,
LastName,
Email,
Numerical.PropertyValue AS Numerical,
Street.propertyValue as Street,
Telephone.PropertyValue As Telephone,
Committee.PropertyValue AS Committee,
Volunteer.PropertyValue as Volunteer,
UserPortals.Authorised
FROM
Users
Right Join dbo.udf_UserProfileField('Unit') as Numerical on Numerical.UserID = Users.UserId and Numerical.PropertyValue >= ' '
Right Join dbo.udf_UserProfileField('Street') as Street on Street.UserId = Users.UserID and Street.PropertyValue >= ' '
Right Join dbo.udf_UserProfileField('Telephone') as Telephone on Telephone.UserId = Users.UserID AND Telephone.PropertyValue >= ' '
Right Join dbo.udf_UserProfileField('Committee') as Committee on Committee.UserID = Users.UserID and Committee.PropertyValue >= ' '
You are not authorized to post a reply.
Special Bonuses
--Subscriber Bonuses
--Readers Offers
Users Lounge
--Announcements
--DNN Creative Articles
--Everything Else
--Feedback, Suggestions and More
--Membership
--Site Review Please!
--Testimonials
--Podcasts
DotNetNuke®
--DotNetNuke® Questions
--Modules
--Modules - What's needed?
--Quick Tips
Hosting
--DotNetNuke® Hosting Providers
Skinning Toolkit
--Skinning Toolkit
UK DotNetNuke User Group
Forums
>
DotNetNuke®
>
DotNetNuke® Questions
Latest Forum Posts
Can you Run Xcode in Linux?
by Aman Singh
Can you Run Xcode in Linux?
Can you Run Xcode in Linux?
by Aman Singh
Can you Run Xcode in Linux?
Billed for subscription that was canceled
by Ryan
I was just billed for a subscription that was canc eled / inactivetive how do I get a refund for th
Meta Title and Meta Description are not showing properly
by DNN User
Hi, On my site the meta title and meta descriptions are not showing properly. It's showing the m
Search is not functioning properly
by DNN User
Site: https://www.prv-engineering.co.uk/search If I search any item only the 1st option under sea
Search is not functioning properly
by DNN User
Site: https://www.prv-engineering.co.uk/search If I search any item only the 1st option under sea
DNN Platform import site optio
by Melanie Weaver
Is it possible to import site template in DNN Platform 8.0? We have internal Evoq Content 8.1 tha
Events Module for DNN V5?
by Tugboat
Would anyone have a download link for the version 5.0.3 Events Module? Thanks!
"Ghost" TabID Number?
by Tugboat
Hi! I have a portal instance with multiple child portals and on one of the child portals, there i
RE: DNN Load Testing
by ayman sharkawy
Hi. Have you already implemented a site using the DNN . And how the performance of the site and its
Publish All Pages
by NSUOK
I'm using DNN Evoq Content Basic 8.2.0. When I make the HTML Pro module display on all pages, I h
Simpler profile needed in 9.2.2
by Donald
We are upgrading a DNN 4.8.4 site to DNN 9.2.2. On 4.8.4, the top bar shows the user’s name. If yo
How to link from dnnmodal popup to web site page?
by Donald
Hello all. I am using a dnnmodal.show popup. The popup works correctly, showing the content that I
RE: Document Collaboration
by Nick Davern
That feature would be super beneficial for our needs as well! Does anyone have an update as to if th
RE: DNN 9.2, how to set default theme?
by Andy Stephenson DNN Creative
you do that under "Manage/Themes". Note the highlight blue border around the default container and d
DNN 9.2, how to set default theme?
by Donald
Please disregard, found Manage Themes I cannot find how to set a default portal theme in DNN 9.2
RE: Looking for DataSprings Dynamic Forms
by Andy Stephenson DNN Creative
Your best chance would be to contact Chad Nash @ http://www.datasprings.com/
Looking for DataSprings Dynamic Forms
by Jakir HM
Looking for DataSprings Dynamic Forms 3.4 for DNN 4.x 5.x for my site (https://themasters2018s.com/)
RE: Help with Cycle Image Carousel not displaying images
by peter
I had the same problem with the Will Strohl Content Slider after upgrading to DNN 9.1 The above an
RE: Object reference not set to an instance of an object
by Andy Stephenson DNN Creative
Check this one might be useful: http://www.dnnsoftware.com/answers/im-tryin-to-move-my-site-to-pr
Used
By
Testimonials