Re: Fill blanks with value from previous record

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Thu, 28 Dec 2006 09:34:01 -0800, xlcharlie
<xlcharlie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I'm sure this question is posted and answered elsewhere, but after some
searching I have yet to find anything. I have a dataset organized as below:

Ticket ID Order ID Execution ID Flag
ABC B
ABC 123
ABC 123 i.
ABC 123 ii.
XYZ S
XYZ 456
XYZ 456 i.
XYZ 456 ii.

I need to pull all the records where Execution ID Is Not Null, but I need to
include the Flag for the corresponding Ticket ID. Is there a way, with an
update query or simply querying an underlying query, that I can fill in the
blank values in field Flag with the nonblank values according to Ticket ID?
All records where Ticket ID Is Not Null will have a Flag value and all
records where Execution ID Is Not Null will NOT have a Flag value (Flag is
blank).

Hope that's clear enough. Thanks in advance.

This is quite possibly IMPOSSIBLE to do.

Tables HAVE NO ORDER. There is no "next record" that can be filled in
with data from the "previous record".

Unless it's appropriate to fill in ALL Null values of FLAG with the
non-null value from the same TicketID, I can't see any way to do this.

You *really* need to change your program logic - this is spreadsheet
thinking, not relational thinking, and it *will* get you in trouble!
If you have a one to many relationship between Tickets and Executions
(whatever those are... tickets to a public hanging...!?) then you
should model it as a one to many relationship between two tables.

John W. Vinson[MVP]
.



Relevant Pages

  • Re: Fill blanks with value from previous record
    ... John, I appreciate your reply but I don't think you read my posting before ... values of FLAG with the non-null value from the same TicketID. ... values according to Ticket ID." ... Execution ID records, but perhaps you can suggest an alternative. ...
    (microsoft.public.access.queries)
  • Re: Dream-com scripter and Server 2003
    ... (No eXecution) ... feature in the BIOS made Dream Scripter work like before. ... The NX flag marks data segments as no executable for security reasons. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: running DTS package in .Net-- no errors, but nothing happens?
    ... I accidentally set the "IsPackageDSORowset" flag to true when I ... I've ported the DTS library to my C# application (using the ... > The execution of the following DTS Package succeeded: ...
    (microsoft.public.sqlserver.dts)
  • Re: Dream-com scripter and Server 2003
    ... > (No eXecution) Flag supported by SP2 on a newer CPU/BIOS. ... > The NX flag marks data segments as no executable for security reasons. ... > is stored in data segments, the NX flag will hinder the CPU ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: SSO Linux --> AD using GSSAPI
    ... On 11/26/2010 2:13 PM, SANDERS Miguel wrote: ... ticket, which is set by the AD KDC in a service ticket based on the ... server's userAccountControl TRUSTED_FOR_DELEGATION flag. ... channel 0 request x11-req reply 1 ...
    (comp.protocols.kerberos)