You are viewing our Forum Archives. To view or take place in current topics click here.
NVL SQL Help - Oracle
Posted:

NVL SQL Help - OraclePosted:

XboxFusion
  • New Member
Status: Offline
Joined: May 03, 201310Year Member
Posts: 45
Reputation Power: 1
Status: Offline
Joined: May 03, 201310Year Member
Posts: 45
Reputation Power: 1
I am trying to find if someone has commission on their pay.

I want to display peoples commissions.

The ones who have commissions will be displayed

The ones who don't, the values need to display 0.

How?

Variables - commissions, employees

#2. Posted:
Imp
  • Retired Staff
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
XboxFusion wrote
I am trying to find if someone has commission on their pay.

I want to display peoples commissions.

The ones who have commissions will be displayed

The ones who don't, the values need to display 0.

How?

Variables - commissions, employees



Not very descriptive, but fortunately I am a SQL Administrator among my many other duties!

SELECT employees, NVL(commissions,0)) FROM [Your Table Name];

The NVL Function replaces NULL with the number in the second parameter (in this case 0)
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.