Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Looking for help with my site's sqlLooking for help with my site's sql
Previous
 
Next
New Post
5/23/2013 10:50 PM
 

Hi guys thanks for looking I am sorry that I keep on dragging this out but I have an Update:

   After playing with the statements,  trying to select different columns  between different tables, I have noticed that only when I attempt to select anything from the userportals table I get an error message stating : There was an error executing the data source: There is an error in your SQL at line 1: Conversion failed when converting the nvarchar value 'anything selected from another table' to data type int.

   I am assuming that the Userportals  table is written in Nvarchar and all the other tables are not? So now the question is how do I decode the Userportals table so that it is compatible with others? Thanks for any suggestions, ideas, or prewritten statements.

 
New Post
5/24/2013 3:14 AM
 

I figured it out finally!!!! I am posting this as a reference for others.

I used this statement to figure it out:

Select username, Firstname, lastname, UserPortals.Authorised

from

users

Right Join dbo.UserPortals  on UserPortals.Userid = Users.Userid where Authorised='true'

 I then tweaked my previous statement to this and it works:

SELECT

Users.UserId,

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 >= ' '

Right Join dbo.udf_UserProfileField('Volunteer') as Volunteer on Volunteer.UserID = Users.UserID   and volunteer.PropertyValue >= ' '

Right Join dbo.UserPortals  on UserPortals.Userid = Users.Userid where Authorised='true'

 

I want to thank Mark for helping and everyone who took the time to read my question!

 

 

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Looking for help with my site's sqlLooking for help with my site's sql


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out