Changed booleans from numeric to nominal as that is the proper way to express them. Also fixed SQL parameterisation so that apostrophes don't break the format.