Quote:
|
The subquery could return more than one row at any point which I'm guessing is not what your after.
|
yes it is,
Quote:
|
I think you also want to be using the if() function rather than the sub query.
|
yes, youre right. instead of using subquery, i should use if() statement.
Code:
SELECT
PawnTicketNo
,LastName
, DateLoan
, DateRedeem
, if( ServiceType = 'Renew', DateLoan, '' ) as 'Date Renew'
FROM pawnshop_tbl p;
thanks a lot!