Hi guys
I am trying to retrieve a row of data where I am matching a foreign key and trying to get the max ID for that criteria. I get the message that the query has complete successfully but i am not getting any data.
Simple Database Structure
ID, PortID, Amount, Balance
Query
select * from t_portfolio_cash
where PortID = 32
having max(ID)
I played around and just retrieve the Max(ID) and that worked fine
Query
Select Max(ID) t_portfolio_cash
where PortID = 32
I don't understand what i am doing wrong. I really need to retrieve the entire row.
Thanks in advance