Sql Dnn user defined tables

Guys

Im lost here slightly.

I am using A list in Dotnetnuke form and list module

so i have the tables DBO.userdefineddata, DBO.userdefinedfields, DBO.userdefinedrows

i want to be able to pull this data from the data bas so it all shows in order.

like the relevany user data shows under the relevant user row/ filed
LVL 1
keeffeAsked:
Who is Participating?
 
Raja Jegan RConnect With a Mentor SQL Server DBA & ArchitectCommented:
This should do:

SELECT t2.FieldTitle,  t1.FieldValue
FROM DBO.userdefineddata t1
inner join DBO.userdefinedfields t2 on t1.UserDefinedFieldId = t2.UserDefinedFieldId
inner join DBO.userdefinedrows t3 on t2.ModuleId = t3.ModuleId

PS: add where clauses as required..
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
>> i want to be able to pull this data from the data bas so it all shows in order

can you provide some sample records from these three tables and the expected result set so that the query can be provided accordingly.
0
 
keeffeAuthor Commented:
Hey yeah sorry i should have been more specific

Ok so in

dbo.UserDefinedData

UserDefinedFieldId      UserDefinedRowId      FieldValue

33      13      123456
34      13      12345
35      13      webadmin@etc.com
36      13      webadmin@etc.com
37      13      webadmin@etc.com
38      13      True

dbo.UserDefinedFields

UserDefinedFieldId      ModuleId      FieldTitle      Visible      FieldOrder      FieldType
33      404      PSC Reference      1      0      String
34      404      PSC Name      1      1      String
35      404      Email Address 1      1      2      EMail
36      404      Email Address 2      1      3      EMail
37      404      Email Address 3      1      4      EMail
38      404      Do you have a valid transponder      1      5      Boolean

And

dbo. UserDefinedRows

UserDefinedRowId      ModuleId
1      384
2      384
3      384
4      384
5      384
6      392
7      398
8      398
9      398
10      398
13      404



So that wehn i pull the data back in this example it will show  Please excuse the fromatting on here. but what i want is say

PSC Reference 123456
PSC Name 12345
Email 1  webadmin@etc.com
Email 2  webadmin@etc.com
Email 3  webadmin@etc.com


I hope this makes senes

thank you

Sean
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
keeffeAuthor Commented:
Ok bare with me on this. Im going to get onto it this afternoon. I'll let  you know how i get on.

Thank you rrjegan
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Sure.. Add any additional WHERE clauses or columns in SELECT clause as required..
0
 
keeffeAuthor Commented:
Thanks alot and sorry for the delay getting back to you. from this i can work towards the solution with my where clauses.

Once again TY
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Welcome..
And glad to help you out..
0
All Courses

From novice to tech pro — start learning today.