• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Distict question

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to have distinct records output and am having problems.

What is the best means of hiding TreatmentDesc from view as well as preventing it from affecting the DISTINCT command?
Regards, Michael
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"What is the best means of hiding TreatmentDesc from view as well as preventing it from affecting the DISTINCT command?"
Um, how about not including it in your Select?
Mark
 
michael bradly
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well if that is the case, then what would be the best means of extracting information from TreatmentDesc since I need information from that table in order to determine which animals have had a dental or vitamin examine, without showing duplicates of those who have had both at the same time?
I was under the impression that DISTICT could prevent duplicate output lines, and hence by not printing out the TreatmentDesc I could obchieve that goal.

Originally posted by Mark Spritzler:
"What is the best means of hiding TreatmentDesc from view as well as preventing it from affecting the DISTINCT command?"
Um, how about not including it in your Select?
Mark

 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wait a second, I thought in oracle you could do this.

Then it would not be a part of the distinct values, but still be in the resultset.
Mark
 
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
trying to do something like this I think...?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic