Return value of prev record if null in query

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.
 
T

Tom Ellison

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top