function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
yama1173yama1173 

SOQL WHERE 句の最大長

初心者な質問で恐縮です。もしご存知であればおしえてください。

SOQL WHERE 句の最大長の制限を見ていて4000文字とありました。

ただバインド変数を用いてSOQLを生成し発行するプログラムで、実際は4000文字を超えるSOQLが発行できています。
この4000文字ってバインド変数などは対象外とうことですか?

https://developer.salesforce.com/docs/atlas.ja-jp.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_soslsoql.htm

以上、よろしくお願いします。
Best Answer chosen by yama1173
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Yama,

Resolution to this issue is to split the actual query into multiple queries and run them in batches if necessary. Hope it will be helpful.

Please mark it as best answer if the information is informative.

Thanks
Rahul Kumar
 

All Answers

Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Yama,

Resolution to this issue is to split the actual query into multiple queries and run them in batches if necessary. Hope it will be helpful.

Please mark it as best answer if the information is informative.

Thanks
Rahul Kumar
 
This was selected as the best answer
yama1173yama1173
Hi Rahul,

Thank you for your answer.
I understood Maximum Length of SOQL statements is 20 K .

In my understanding ,
even if SOQL statements is over 20 K,Soql is work .
Influence is only performance.

Is it correct?

Thanks,
Ryo