Return value of prev record if null in query

  • Thread starter Thread starter Laura
  • Start date Start date
L

Laura

I would like to develop a query to return a value of the
previous record if the next record's value is blank.

Example:

Record1 application_id=1.
Record2 application_id=" ".

If application_id=" " application_id=previous record's
application_id.

Any idea of how to write that in SQL or in query format?
Thx.
 
Dear Laura:

If, by previous, you mean to reference a row in a specific unique
ordering of the table or query, then this can be done using a
correlated subquery. In order to suggest specifics on how to do this,
I would need to know what what column(s) form that unique order.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top