The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: RE: web software (Front Page)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [OT] SQL question


  • To: <ukha_d@xxxxxxx>
  • Subject: RE: [OT] SQL question
  • From: "Jon Whiten" <jon@xxxxxxx>
  • Date: Fri, 22 Mar 2002 19:34:08 -0000
  • Delivered-to: mailing list ukha_d@xxxxxxx
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

Not sure, but why not the following.

When adding the data:
Find the record where (Parent Record) and (Last updated flag) match --
Update to clear flag.  Insert new record with (Last updated flag) set. 
Then
you can select all records where the (Last updated flag) is set.

Or have another table that stores the latest child record number for each
given parent record.



Regards,

Jon
http://www.whiten.co.uk/



> -----Original Message-----
> From: Dr John Tankard [mailto:john@xxxxxxx]
> Sent: 22 March 2002 17:39
> To: ukha_d@xxxxxxx
> Subject: [ukha_d] [OT] SQL question
>
>
> Sorry for the OT post
>
> drastically simplified
> 2 tables
> 1 to many relationship
>
> I want to select just the most recent child, so for each row in the
> parent I want to show only one (the most recent) row in the child
>
> DISTINCT wont work because the child rows are not identical
>
> Any Ideas
>
> John
>



Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.