الانتقال إلى المحتوى

سؤال في أمر Select Sql


منمون علي

Recommended Posts

Create a query that displays the employees’ last names and commission amounts


If an employee does not earn commission, show “No Commission.” Label the column




.COMM



and my solution is


('select last_name,nvl2(commission_pct,commission_pct,'No commission


comm


from employees


but have error

تم تعديل بواسطة منمون علي
رابط هذا التعليق
شارك


try to change the 1st value to be char

Select last_name, nvl2 (commission_pct , to_char(commission_pct) , 'No commission' ) comm
from employees


Regards

thanks this correct
رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية