0

I am getting the above error for :

for(String objName : objAPINames){
    for(sObject s : Database.Query('Select Id from ' + objName + 'where CreatedDate <= ' + reqDate)){
        recordIds.add((Id)s.Id);
    }
}

Can anyone help with this

3

Your query should be like this.

Database.Query('Select Id from ' + objName + 'where CreatedDate <=: reqDate')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.