Database.query(soql);String strName = 'Test';String soql = 'Select Id, Name From SObject';if(Name != null){ soql += 'And Name LIKE \'%' + strName.trim() + '%\'';}eg:public void
原创
2014-08-23 12:21:32
1111阅读
在Batch Apex中使用Aggregate SOQL统计查询语句及结果 前言 Database.Batchable in Salesforce, but if you want to use SOQL having aggregate functions like SUM(), MAX(), C ...
转载
2021-08-11 17:08:00
114阅读
2评论
我们有时候根据需求,需要编写动态的SOQl语句,这个时候我们就需要用到Database.Query, Database.getQueryLocator以及Database.countQuery 1. Database.query 运行时它将作为SOQL查询执行并返回单个sObject或sObject ...
转载
2021-07-21 11:13:00
784阅读
2评论
There was a issue with the SOQL query. The query was taking a longer time to execute and when it was crossing 120 seconds, it was giving time out error. i had to use some index fields in my query to narrow the query range. it worked for me.Some times due to queries it takes lot of time to execute.Tr
转载
2013-03-11 12:28:00
304阅读
2评论