Criteria?

aner1755

Registered User.
Local time
Tomorrow, 00:12
Joined
Jan 23, 2009
Messages
43
Hi All!
Is there someone who knows how to make somewhat nested query to two tables?

My goal is to;
Two tables which both contains dates and times should be queried such a way that each date from the first table is matched to corresponding date in the second table.

What I’ve tried;
In fig table4.GIF the query attempt is showed. The query is based from the two tables tblTid (table1.GIF) and tblTimeActual (table2.GIF). The result from this query can be seen in table3.GIF. Here one can see that each date in column MånadOÅr has five corresponding field in column MånOÅrActual. I want a date in MånadOÅr to have just one corresponding date in MånadOÅrActual. How to get that?

Suggestions;
Some kind of Criteria is needed I guess…?
 

Attachments

  • table1.GIF
    table1.GIF
    41.4 KB · Views: 107
  • table2.GIF
    table2.GIF
    36.8 KB · Views: 106
  • table3.GIF
    table3.GIF
    71.9 KB · Views: 102
  • table4.GIF
    table4.GIF
    48 KB · Views: 109
In your gif files the link is made between two fields with the same name: UppdragID. The contents of these fields appear to be integer numbers. You have to make a different link betyween the two tables.

HTH:D
 
Thanks for responding!

I’m not quite sure what I need to do, actually I’m nearly lost. But if it is a different dependency that is needed I’ll play around a bit and see what gets.

Did I describe the situation well so you got the picture, or is it unclear what I want out of the query?

Cheers!
 
You must use different fields to connect to eachother. Delete the current one and create a new one like the modified picture shows.

HTH:D
 

Attachments

  • table4modified.GIF
    table4modified.GIF
    48.1 KB · Views: 102
if your requirement is to match the data on both UppDragID and the date, instead of only the UppDragID.. simply add that field in the join.
 
Yeah!
Many thanks to you Guus2005 and namliam, with the combined dependency I get what I wanted. Slowely, slowely I'll get the hang of this... ;)

Salut!
 

Users who are viewing this thread

Back
Top Bottom