A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

query with subquery does not take all rows it should i think



 
 
Thread Tools Display Modes
  #11  
Old February 28th, 2007, 10:46 AM posted to microsoft.public.access.queries
Gary Walter
external usenet poster
 
Posts: 613
Default query with subquery does not take all rows it should i think


wrote in message
oups.com...
On 27 Lut, 17:23, "Gary Walter" wrote:


okay...

change last line to

c.price_start_date=b.days

i.e.,

Select
a.product_nb,
b.days,
a.price_start_date,
a.shop,
a.price
from
table1 as a, table2 as b
where
a.price_start_date=
(select
max(c.price_start_date)
from table1 as c
where
c.shop=a.shop
and
c.product_nb=a.product_nb
and
c.price_start_date=b.days)- Ukryj cytowany tekst -

- Pokaż cytowany tekst -


YYYEEESSSS

You changed one letter :-) and its working. It is so logical now. I
was so stupid.
Many many many thanks Gary I was loosing faith in sql instead of
thinking

All the best for you
Patryk


You're welcome Patryk.

I know the feeling.

Old trite American saying:

"Been there, done that."



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.