بتاريخ: 26 يناير 200917 سنة comment_147715 السلام عليكم اخوانى الاعزاء مرفق كود اردت ان اجرب كيفيه الاستعلام من خلال الجدول بالمقارنه من خلال تكست بوكس و يخرج " اهلا " فى حاله ان المستخدم متواجد او يخرج " لا " فى حاله عدم التواجد و هذا هو الكود : declare user_id employees.employee_id%type; user_name employees.first_name%type; begin select employee_id,first_name || last_name into user_id,user_name from employees where employee_id = :txt_id and first_name =:txt_name; if user_id <>'' then message('welcome'); message('welcome'); end if; exception when no_data_found then message('nonono'); message('nonono'); end; --- مرفق الشاشات و شكرا TEST_GET_FROM_TABLES.zip تقديم بلاغ
بتاريخ: 26 يناير 200917 سنة comment_147723 did you try to put " : " befor Variables ? ******beginselect employee_id,first_name || last_nameinto : user_id, : user_namefrom employeeswhere employee_id = :txt_id and first_name =:txt_name;if :user_id <> ' ' thenmessage('welcome');end if; تقديم بلاغ
بتاريخ: 26 يناير 200917 سنة comment_147745 مرحبااحذف الشرط اللي انت عامله؛ لانه اذا كان في موظف رح يكمل الكود و يطلع المسج, اما اذا ما كان في موظف رح يعمل exception.و مافي داعي تعمل بحث بـ اسم الموظف. declare user_id number; user_name varchar2(200); begin select empno,ename into user_id,user_name from emp where empno = :txt_id; --and first_name =:txt_name; -------------or----------------- /* select empno,ename into user_id,user_name from emp where lower(emp_name) like '%'lower(:txt_id)||'%'; */ ------------------------------ --if user_id is not null then message('welcome'); message('welcome'); -- end if; exception when no_data_found then message('nonono'); message('nonono'); end; تقديم بلاغ
بتاريخ: 26 يناير 200917 سنة كاتب الموضوع comment_147749 السلام عليكم اخوانى اشكرمك .. يا احبابى .. على المساعدة الجليله اخى a_mukhtar78 شكرا ولاكن ليس المشكله .. فى ال " : " حيث اننى اتعامل مع متعيرات داخل البروسيدر . و ليس خارجها .. الاخر ORA-2008 شكرا لك .. بالفعل الخطأ فى الشرط التانى .. فعلا حيث ان ليش هناك شئ اسمه : كـود PHP <>'' يكتب كـود PHP field_name is not null شكرا تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.