Trying to Change a blank value in a Query

G

Guest

I import some data(call it the Financial Cube) from our mainframe into a
table. The financial cube uses a code for the employee name. I created a
table which contains the Employee Name and the code used in the Financial
Cube.

In a query, I use link the two tables on the code for the employee so that
the query can convert the employee code to a recognizable employee name.
Problem is that some of the employees, in the financial cube, are no longer
with the
company. Conseqently, the query returns invalid employee codes with the
Employee Name as blank space.

I'd like to change this blank space to "unknown" when I generate the report
using the query, so that I can group all the unknowns.
Any ideas.....? Thank you.
 
M

MGFoster

Rob said:
I import some data(call it the Financial Cube) from our mainframe into a
table. The financial cube uses a code for the employee name. I created a
table which contains the Employee Name and the code used in the Financial
Cube.

In a query, I use link the two tables on the code for the employee so that
the query can convert the employee code to a recognizable employee name.
Problem is that some of the employees, in the financial cube, are no longer
with the
company. Conseqently, the query returns invalid employee codes with the
Employee Name as blank space.

I'd like to change this blank space to "unknown" when I generate the report
using the query, so that I can group all the unknowns.
Any ideas.....? Thank you.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the Nz() function:

Nz(EmployeeName, "Unknown")

This will only work if the EmployeeName column value is NULL. If the
EmployeeName value is an empty string, "", then use this:

IIf(Len(EmployeeName)=0, "Unknown", EmployeeName)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQgfkH4echKqOuFEgEQJzPACg86SLB1kmO7PTPsMPMinPD/aY6hMAn2GY
is564I42JiBtZaWFh7cMiNNH
=Olbq
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top