I'm having trouble with the following sql query
select sr.rekeningnummer display_value, sr.rekeningnummer return_value
from studentenrekening sr
where not exists (SELECT *
FROM studentenkredietrekening skr
WHERE sr.rekeningnummer = skr.rekeningnummer);
(rekeningnummer is account number in english and studentenkredietrekeningnummer is creditcard number in english)
I'm having a list of values in a form in apex 4.0 which should contain the values of a account number which doesn't have a creditcard yet.
When I put the sql in the LOV list, I'm getting the following error: 1 error has occurred Failed to parse LOV SQL query! ORA-00911: invalid character
What's wrong with my query? When I run it in SQL Developer it does give me the right account numbers.
Just remove that semicolon at the end of the statement.
select sr.rekeningnummer display_value, sr.rekeningnummer return_value
from studentenrekening sr
where not exists (SELECT *
FROM studentenkredietrekening skr
WHERE sr.rekeningnummer = skr.rekeningnummer)