Fixing data type error in SQL creation