I have query like as follows.But when it is executed I am getting error message **unexpected token: except**

```
select d from DimensionStone d inner join d.stockRegister s 
where d.stockRegister.stockRegisterId <=? and s.application.applicationId=? 
and d.isIssued='No' or (s.stockRegisterId <=? and d.isIssued='Yes' 
and d.issuedDate>(select max(updatedOn) from StockRegister st 
where st.stockRegisterId<? and st.application.applicationId=?)) 
except (select d1 from DimensionStone d1 inner join d1.stockRegister s1 
where s1.stockRegisterId <=? and s1.application.applicationId=? and 
d1.isIssued='No')

```

How I can solve this problem.I have already searched enough through google.But I cannot find the desired answer.Please help me