Question: I wrote below query for single status check, it is working but not for multiple status checks, it is throwing errors. 

```
String draft = 'Draft';
String cancel = 'Cancelled';
String cmpnQuery = 'SELECT ID,Name,FROM Campaign where status!=:draft'; //working without issues

 String campQuery = 'SELECT ID,Name FROM Campaign where status NOT IN (draft,cancel)'; // not working

for(Campaign cmpn:Database.Query(cmpnQuery )){
//TO- DO
}

```

Answer: 
Use [Quoted String Escape Sequences](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_quotedstringescapes.htm) character 

```
Database.query('SELECT ID,Name FROM Campaign where status NOT IN (\'draft\',\'cancel\')')

```
Sarvesh and Zach are good anwsers, you can also achieve the same result with the next query.

```
SELECT Id, Name
FROM Campaign
WHERE Status != 'draft'
AND Status != 'cancel'

```