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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListWriting subqueries against UDT DataWriting subqueries against UDT Data
Previous
 
Next
New Post
1/10/2007 4:55 PM
 
Hello,

I'm having the time of my life trying to figure out this query!!!

For instance, In the udt there is a column called "Created Date" which is actually stored under UserDefinedFields

Let's say there's another field called "Total" also in that UDT.

How would I write my query if I wanted data returned in two columns with Headings "Created Date" and "Total" the corresponding values for the Row from the UDT?

I see the UDT stored proc's simply return them by UserDefinedRowId, so I would assume the UDT BLL will then loop thorugh each record, separating them by Rows.

A reason for my question could be to implement it into the Reports Module or something similar.

Regards!


Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
New Post
1/10/2007 5:04 PM
 
What are you missing in UDT that you desire Reports Module for reporting?

We don't query a normal table but cells. They are rebuild as Table in memory. You can write sql statements to access udt, however it is a bit tricky and is not working in every case. 
 
New Post
1/10/2007 5:05 PM
 

UDT stored all data serialized for flexibility - so all user defined tables with different structures can be stores in the same database tables. the tradeoff is, that it is more difficult to access the data. it is easier, if you use SQL 2005 with the pivot statement, UDT itself used a core function that created a dataset from the serialized data.

For your concrete example I you can use the following query (assume that FieldID of CreatedDate is 132 and FieldID of Total is 143):

SELECT C2.Value as Total, C1.Value as CreatedDate 
FROM UserDefinedData AS C1 INNER JOIN UserDefinedData AS C2 on C1.RowID = C2.RowID 
WHERE C1.FieldID = 132 and C2.FieldID = 143

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
1/10/2007 5:10 PM
 
Stefan, Thanks for the quick reply.

It's basically graphing. 

I had my client create a UDT that has the following columns
  • Report Date
  • $ Earned
  • Projected $ Earned
  • Referrals
  • Projected Referrals
  • etc etc
So they would like a line graph showing actual vs projected for the various columns.  Obviuosly 1 line graph would only cover 2 columns such as $ Earned vs Projected $ Earned  - but shown across by date.

they have already purchased a Graphing module, and I noticed the Reports has some graphing capablilities too.  Either way, both modules require the query.... hence my circumstance.


Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
New Post
1/11/2007 9:47 AM
 
Sebastian,

Many many thanks!!  It makes sense as I look at it.  I didn't notice your reply earlier, I must've been typing when it came through!

But one thing, it doesn't seem good to have the fields returned as ntext - well in my case the columns returned in SQL Server MGMT Studio Express, I have to scroll right to view only the second column.  But an rtrim() won't work.  Seems if alot of rows are passed, this could affect performance?

Also,  I can't select between different dates  ie: Between 1/1/2007 and 1/1/2006 because of the ntext.  Any Ideas here?  It seems my "easiest solution" isn't that after all.


Andrew Walker

Learn to make your own beer and wine at homeIf you enjoy making your own beer and/or wine - be sure to check out http://www.ForemostBrewing.com
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListWriting subqueries against UDT DataWriting subqueries against UDT Data


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