Adding 0 to blank records

Ron_Mowry

New member
Local time
Today, 08:24
Joined
Mar 3, 2009
Messages
6
I have 2 tables Employee_list containing (Manager, Emp_Name, Emp_Number)Table 2 is March_Connected that includes the following fields( RGU(This can be labled either Digital, Data, Video, or Phone)) & Emp_Number). If the employee does have a sale under the RGU colum it will show up as either (Digital, Data, Video, or Phone). What I am trying to do is do make sure everyone in the Employee_List is listed using an Outer join no matter if they have a sale in the March_Connected Table. Now if there is no data listed in the RGU field I would like the blank value to be replaced with 0. What my ultimate goal for this is to create a running count of how many sales each employee has in each of the following catagories(Digital, Data, Video, or Phone). At this point I am unsure if I will need to have 4 different Queries one for each sales catagory or if this could be done in 1 query. If you could shed any ligh on this question it would be greatly appreciated.
 
Last edited:
If you are using the Query builder you can do this:

The Query I propose will update each record to 0 whose Length is 0.
See the picture:
Len_Field_0_Update_0.jpg
 
When you bring the RGU field into your query, use the nz function to change nulls to zeroes:

SELECT nz(RGU, 0) as Alias1

This will give you zeroes in your query dataset, but won't update the actual table cells--they will remain as nulls.


Duluter
 

Users who are viewing this thread

Back
Top Bottom