I generate query like this:
Dim goods As List = New List()
Dim rateValue as Integer = 100000
For i As Integer = 0 To rate
goods.Add(i)
Next
Dim Sql As System.Text.StringBuilder = New System.Text.StringBuilder()
Sql.AppendLine("SELECT G.ID, G.NAME")
Sql.AppendLine("FROM GOODS G")
Sql.AppendFormat("WHERE {0}", GetSqlListPartition(goods,"G.ID"))
string GetSqlIDListPartition(List list, string propertyName) - Method partition List to condition like: (propertyName IN (...) OR propertyName IN (...) OR propertyName IN (...) ) in case List contains more 1000 elements
When I execute this query the error is appeared: ORA-00913: too many values
.
But if I set rateValue = 10000
and generate query, it executes ok. What is the problem here?
I attached the query http://dfiles.ru/files/z1yq9iazj (i cant write it here because have error: "too long by 589752 characters")). The most interesting that if delete "0" from first IN it will executed ok.
ps. oracle version 10