Standardise getSQL case