in reply to Re: Mocked query returns wrong result
in thread Mocked query returns wrong result

Thanks for the information and suggestion.

  • Comment on Re^2: Mocked query returns wrong result

Replies are listed 'Best First'.
Re^3: Mocked query returns wrong result
by chacham (Prior) on Oct 24, 2014 at 17:57 UTC

    In this particular case, CASE might be better because it can use LIKE, which is better than SUBSTR which would negate the use of an index.

    Though, specifying LIKE for each option might work against that, so its hard to tell.

    CASE WHEN te.TEAM_ID LIKE 'MU%' THEN 'Manchester United' WHEN te.TEAM_ID LIKE 'RM%' THEN 'Real Madrid' END Team