making sql portable