Hi there,
I am trying to create a report for use with SQLbase. The query for this report returns a value only if there is at least 1 row in table B that matches the key in table A. However, in some cases, there may be multiple rows in table B that match table A, in which case my query returns multiple identical lines - one for each match in table B.
I would like to have the query return only 1 row regardless of how many matching rows there are in table B. Is there a way in SQLbase to limit the number of rows returned? For example, in other DBs, like SQL server, you can state "limit 1" or something similar in the SQL query to limit the number of returned rows to 1, but I haven't been able to find anything that will do the same in SQLbase.
By the way, for reasons that I won't bore you with, I cannot restructure the entire query, nor would I want to, because the majority of queries work just fine. Only a small number (say 1 in 400) produce this multiple result.
Thanks.
I am trying to create a report for use with SQLbase. The query for this report returns a value only if there is at least 1 row in table B that matches the key in table A. However, in some cases, there may be multiple rows in table B that match table A, in which case my query returns multiple identical lines - one for each match in table B.
I would like to have the query return only 1 row regardless of how many matching rows there are in table B. Is there a way in SQLbase to limit the number of rows returned? For example, in other DBs, like SQL server, you can state "limit 1" or something similar in the SQL query to limit the number of returned rows to 1, but I haven't been able to find anything that will do the same in SQLbase.
By the way, for reasons that I won't bore you with, I cannot restructure the entire query, nor would I want to, because the majority of queries work just fine. Only a small number (say 1 in 400) produce this multiple result.
Thanks.