Hi there,

A query which I'm running for a user keeps failing with

"ORA-01652: unable to extend temp segment by 40964 in tablespace TEMPORARY_DATA :-1652"

error message.

The query has a like criteria in it which is causing the problem,
"AND USER_DATA_FIELD_14 Like 'Y%"

The user_data_field_14 column has 2 values in it 'YES' or 'NO', unfortunately the field also has many ' ' spaces in it.

If I use the command
"AND RTRIM(USER_DATA_FIELD_14,' ') = 'YES'
it runs correctly,

However the script is being created through an application and you can't manually change it to include the "RTRIM".

I can't increase the temporary_data tablespace (not enough disk)

Can anyone suggest anything else I can do to make the query run.

Many thanks

Alison