One query record results as 2 separate lines??

G

GD

Is it possible to design a query to result in 2 separate lines per record?
Let's say I have the following as fields: invoice #, date, amount, approved
by, approval date. Can I get it to result in (including indentation, if
possible)?:

Record 1.invoice # Record 1.date Record 1.amount
Record 1.approved by Record 1.approval
date
Record 2.invoice # Record 2.date Record 2.amount
Record 2.approved by Record 2.approval
date
etc,etc,...

Or is a report necessary to accomplish this?

Thanks!!!!
 
K

KARL DEWEY

UNTESTED --
SELECT [invoice #] AS [Invoice], [date] AS [Date / Approved By], [amount] AS
[Amount / Approved], 1 AS Record
FROM YourTable
UNION ALL SELECT Null, [approved by] AS [Date / Approved By], [approval] AS
[Amount / Approved], 2 AS Record
FROM YourTable
ORDER BY [invoice #];
 

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