lorraine
05-31-2011, 03:20 AM
Hi. I have the following table:
tblTransaction fields:
transID
bookID
borrowerID
borrowTime
returnTime
duedate
penalty
I have an asp.net listview and I want to have a result with something like this:
SELECT transID, 'Borrowed Book' as Transaction,bookID, borrowTime FROM tblTransaction
This query will give me something like this.
http://i54.tinypic.com/kedpx1.png
and I also need this:
SELECT transID, 'Returned Book' as Transaction,bookId, returnTime FROM tblTransaction
will give me this:
http://i54.tinypic.com/2elcm85.png
What i want is put those two query results in just one table because this is exactly what i needed. Is there a way to do that? Thanks
tblTransaction fields:
transID
bookID
borrowerID
borrowTime
returnTime
duedate
penalty
I have an asp.net listview and I want to have a result with something like this:
SELECT transID, 'Borrowed Book' as Transaction,bookID, borrowTime FROM tblTransaction
This query will give me something like this.
http://i54.tinypic.com/kedpx1.png
and I also need this:
SELECT transID, 'Returned Book' as Transaction,bookId, returnTime FROM tblTransaction
will give me this:
http://i54.tinypic.com/2elcm85.png
What i want is put those two query results in just one table because this is exactly what i needed. Is there a way to do that? Thanks