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

1 Answer 1

3

Your query should be like this.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .