Did you edit the query in the XML output file from the XOG? And the XOG back into your test environment?
I'm also confused why you are testing a sql query this way (ie via a look-up). I generally write my Studio Queries as:
SELECT @SELECT:DIM:USER_DEF:IMPLIED:INV:D.CODE:CODE@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:INV:D.NAME:NAME@
from
(select
i.code,
i.name
FROM INV_INVESTMENTS I
) d
where @FILTER@
Above code has not been tested, just using as an example.
This way I can pull out the real query
select
i.code,
i.name
FROM INV_INVESTMENTS I
and run in query tool like TOAD, SQLDeveloper which I'm used to and then do my QA on the data.