You need to sign in to do that
Don't have an account?
Betre Kenna
Database.query error. unexpected token: WHERE
Hi All,
I am stuck with this challange 'Create a Visualforce page displaying new cases', could anyone help me?
I am getting this error message: "Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: unexpected token: WHERE"
I belive I did the class correctly. Here it is:
public class NewCaseListController {
public List<Case> getNewCases(){
List<Case> results = Database.query(
'SELECT ID, CaseNumber, Status' +
'From Case ' +
'WHERE Status = \' New \'' );
return results;
}
}
I am stuck with this challange 'Create a Visualforce page displaying new cases', could anyone help me?
I am getting this error message: "Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: unexpected token: WHERE"
I belive I did the class correctly. Here it is:
public class NewCaseListController {
public List<Case> getNewCases(){
List<Case> results = Database.query(
'SELECT ID, CaseNumber, Status' +
'From Case ' +
'WHERE Status = \' New \'' );
return results;
}
}
Please can you try and copy and paste the below:
'SELECT Id, CaseNumber, Status ' +
'FROM Case ' +
'WHERE Status = \'New\' '
Thanks, Jawaad
All Answers
Please can you try and copy and paste the below:
'SELECT Id, CaseNumber, Status ' +
'FROM Case ' +
'WHERE Status = \'New\' '
Thanks, Jawaad
thank you very much! I don't know what you did, now it works. Thank you again.
Betre
Sorry, i should have explained .... your line 1 should have had a space after status and before the apostophe.
Status'
Status '
Can you see the difference now!
Glad it's resolved.
Thanks, Jawaad