Gastric lavage is usually used for gastric preparation before endoscopy in patients with upper gastrointestinal bleeding. However, the benefit-risk balance of putting a nasogastric tube in these patients is not clearly defined. This randomized trial is aimed to determine if the use of erythromycin IV before endoscopy could avoid to put a gastric tube for the management of upper gastrointestinal bleeding.