Saved Search to query Document Version against an Environment Attribute Value

I would like to create a saved search that returns all documents where the document version string does not match a particular environment attribute value. The help on custom expressions is quite light, I've tried entering this in the attribute that should match the document version string (doesn't work):

NOT LIKE (SELECT o_version FROM dms_doc WHERE o_projectno=$VAULT$ AND o_itemno=$DOCUMENT$)

Thanks in advance