change sql associated with bed no