Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: r3ck
  • Order by date
  1. r3ck

    Selection first 2 from 2nd table

    > Sorry for the typo Well, I should have been able to see that. Thanks for this. I thought the solution was just a little down the road as I learned more SQL but I wasn't even close. I'm going to munch on this a bit and probably get back with a couple questions if you don't mind. I'm...
  2. r3ck

    Selection first 2 from 2nd table

    Hi PH. Thanks for this. It gives 'Syntax error in JOIN operation' and I'm not sure how to go about debugging yet. It's given me something to work with. Rick --
  3. r3ck

    Selection first 2 from 2nd table

    > In which tables are Adults, Children and Birthday ? Hi, Birthday is in tblClients and Adults, Children are in tblHouseholds. SELECT h.RecordID, [h.Adults]+[h.Children] AS Total, c.FirstName, c.LastName, h.Street, h.Address, h.Suite, (Date()-[c.Birthday])/365 AS Age FROM...
  4. r3ck

    Selection first 2 from 2nd table

    > I think you didn't understand my question. Yeah, jumped to confusion. I edited the code down to what I thought was the essence and went too far. I'm trying to get the oldest 2 clients for each household under the assumption that they're the head of the household. SELECT h.RecordID...
  5. r3ck

    Selection first 2 from 2nd table

    >> select the first 2 clients from each household >How would you ORDER tblClients for each RecordID ? So this is a pretty basic question? Changing to ORDER BY tblClients.RecordID gives the same result so that's not it. I'm new to SQL and had trouble getting this far, although I'm reading as...
  6. r3ck

    Selection first 2 from 2nd table

    Hi All. I've trying to select the first 2 clients from each household. I'm sort of close but I can't see where to go from here. The following code selects those households that have less than 3 clients in them. I'd like to select every household and also up to 2 clients belonging to that...

Part and Inventory Search

Back
Top