We have a database where contacts are only soft-deleted, i.e. we set a bit named deleted to true. The API handles this, but sometimes you need to run queries directly against the database and it's easy to forget that bit, and export contacts that are actually deleted. It's not a big problem, because I'm used to the system, but if I'm on holiday, or if someone else is to take over I'd like to make sure these rows are not returned - unless specifically asked for. This leaves us with the following two questions:
Is there a way to tell SQL Server (2005 in this case) not to return rows if for example a bit is set to true?
If so, can these rows still be retrieved if specifically asked for (where bit = 'true')?