Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error: Select statemnet contains too many input variables

naveen_inuganti2
Active Contributor
0 Likes
794

Hi Friends,

I have a select query , in where condition i do have one field which can fectch data for given range.

This ranges table filling with one of my internal table loop.

For huze runs... this range table frequently contains more than 8000 values in it.

with that I getting runtime error by saying that:

Possible error causes:                                  
 o The maximum size of an SQL statement was exceeded.   
 o The statement contains too many input variables.     
 o The input data requires more space than is available.
 o ...

So how can solve my problem...

Here one thing... I want to include in this thread.

As we know we can write our where conditon as "where field like 'MAT%'." in case where my filed value starts with MAT always.

Here how can utilize like keyword in case where i can have more than one values like MAT to check with.

Say... i should fetch entries form db table where field like 'MAT%' and field like 'LAT%' and field like 'NAT%'.

and these values(MAT, LAT, NAT) should not be static , these are dynamic values.

If this can resolve my above issue resolves. becuase in that 8000+ entries i do have 25 for each value my internal table.

Let me know if any doubts.

Thanks,

Naveen Inuganti.

6 REPLIES 6
Read only

Former Member
0 Likes
717

Hi,

Can you tell me exactly how you wrote your select statement so that I can help you?

Regards,

Subhashini

Read only

Former Member
0 Likes
717

Hi,

Kindly post ur select query in this thread.

Moreover, 8000 records are not considered to be huge data...Internal can handle 8000 records very easily..

Regards,

Vimal.

Read only

0 Likes
717

I am Not saying that my internal table is not able to hold 8000 records..

One of field in where condition is giving 8000 values to get data.

Read only

0 Likes
717

Use FOR ALL ENTRIES instead.

Rob

Read only

Former Member
0 Likes
717

Hi,

Are the pattern strings 'MAT',' LAT' or 'NAT' are being entered in the selection screen or they have to be fetched dynamically from those records from the table based on the where conditions in the select statement?

Regards,

Vik

Read only

naveen_inuganti2
Active Contributor
0 Likes
717

I just removed where condition and fetching all values and doing required modification to the table.