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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> 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
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

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 & Architect, EE Solution GuideCommented:
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 & Architect, EE Solution GuideCommented:
Welcome..
And glad to help you out..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.