Having the NOT IN SQL query equivalent in a view I have a site in which user can choose three programmes between 9. I would like to have a view that gives me the 6 programmes a user didn't choose. I've created programmes using taxonomy so each of my users have a term reference on programmes that contain the 3 programmes. 

Any idea would be appreciated, Thanks
Forget the Views Raw SQL module. Simple SQL is not going to give you the result you need. Queries look for what is there, not what isn't.

You will need to construct two lists. First, the list of programmes the user has selected.

$selected_programmes = array();

foreach ($user-&gt;field_taxonomy_programme['und'] as $selected_programme) {
  $selected_programmes[] = $selected_programme-&gt;name;

}


Second, the list of available programs.

$available_programmes = array();

$vocabulary = taxonomy_vocabulary_machine_name_load('programmes');

$programmes = taxonomy_get_tree($vocabulary-&gt;vid);

foreach($programmes as $programme) {

  $available_programmes[] = $programme-&gt;name;

}


Then you can use the two lists to produce a list of the unselected programmes, which can then be used to construct your query.

$unselected_programmes = array_diff( $available_programmes, $selected_programmes);


There is no way around it. The only way to construct a query for values which are not present is programmatically. I would suggest the use of a block with a php snippet to display this information.