I am using sybase database to query the daily transaction report. I had subquery within my script.
Here as it goes:
SELECT orders.accountid ,items.x,etc (SELECT charges.mistotal FROM charges where items.id = charges.id) FROM items,orders WHERE date = '2008-10-02'
Here I am getting the error message as Subquery cannot return more than one values.
My values are 7.50, 25.00
I want to return the 25.00...but when i use
(SELECT TOP 1 charges.mistotal FROM charges where items.id = charges.id)
My result is 7.50 but I want to return 25.00
Does anyone has any better suggestion....