Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query problem
Ryan,
As long as you are only selecting columns from the "one" side then add DISTINCT and you should only get one row. If you are selecting columns from both tables then I don't see why you would only want one row returned.
Shawn Clark
Meridian Technology Group
"Ryan Novak" <ryan_nospam_at_nospam.novak.net> wrote in message
news:4dqG4.34262$MZ2.451051_at_news1.wwck1.ri.home.com...
> Ok, I have two tables that have a one-to-many relationship.
>
> I want to merge both these tables into a single view. No problem.
>
> Now here is where my problem begins. Let's say that this view returns two
> records caused by the one-to-many relationship. Each record is unique
> because of the "many" side. How do I get it to return one row? For
> example, I just wanted to get the most recent data from the "many" side.
>
> I am using MSSQL 7.0 as a backend. I can do this in a query in Access,
but
> haven't been able to figure out how to do it in SQL.
>
> ---Ryan
>
>
>
>
Received on Tue Apr 04 2000 - 00:00:00 CDT