This topic is locked

Grouping results and using DISTINCT

12/13/2004 8:20:17 PM
ASPRunnerPro General questions
D
dmnscar author

Hi there all.
I was wondering if it is possible to group certain displayed fields of a table e.g. for the many Sales Orders we have, if we can only have each Customer listed and then click on the Link to go view all details from that Customer.
Also, if this is not possible, then is there a way to view DISTINCT on a field in a table e.g. SELECT FROM SalesOrder DISTINCT ON Cust_ID. I have read about having DISTINCT on one SELECT query, but with many SELECTs I have not found...

This is more of a SQL question, but there
might* be a way through ASPRunner... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=966&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
Thanks in advance,
Damien

Sergey Kornilov admin 12/14/2004

Damien,
I'm not sure if I got this question.
Probably you can setup a master-detail relationship between Orders and Customers. Each Order record will display a link to Customer who placed this order.
Is that what you trying to implement?

D
dmnscar author 12/14/2004

Actually, thinking about it, the Master-detail r'ship would solve the problem!! Another person wanted the view to be per Customer, but I forgot to explain the Master-detail view and how they can go to Customer table and then click on the Sales Order link.

As with the DISTINCT question, I suppose the above possibility answers that one as well!

Feel a bit silly now... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=2924&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />
Thanks for your feedback,
Damien