i am using db2 7.1. i am creating a subquery which returns about 100 results. ex: select zip_code from address where city = 'Los Angeles'. the problem is i only want one result. i can't use fetch first only in a subquery. can someone help me?
Maybe if you posted the whole query, there might be an alternative way to do it? Not too au fait with zip codes, as our post codes zone down to about 6 individual addresses. Does LA have multiple zip codes? In which case, aren't you bothered which one you get returned?
John,
As Steve says in the last post, a bit more information might be required as to what specific row you want out of the 100 returned by the sub query. Would MIN(zipcode) or MAX(zipcode) work at all?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.