This randomized trial is aimed to determine if the use of erythromycin IV before endoscopy could avoid putting a gastric tube for the management of upper gastrointestinal bleeding. It is a prospective, controlled, randomized, multicentric study with a blind assessment of the main criteria. All patients aged more than 18 years with an acute upper gastrointestinal bleeding, defined by melena or hematemesis, managed by emergency department are enrolled. 270 patients are expected. Informed consent including for endoscopic examination and no contraindication for using Erythromycin (QT enlargement) is needed. Patients are randomized in three groups: Erythromycin alone, nasogastric tube with gastric lavage alone or both Erythromycin and nasogastric tube. Patients are followed-up until first month after bleeding. The main criteria are the visualization of the gastric tract and the other criteria are rebleeding until D 30, transfusion, gastric tube or erythromycin complications.