Thanks for the help Marcin. The process needs to be run every night hence the need for it to be a script rather than using the field calculator in ArcMap. Your code for the calculate field tool worked perfectly. Here's the resulting Python script:
# ---------------------------------------------------------------------------
# TEST.py
# Created on: Thu Jul 12 2012 08:48:42 AM
# (generated by ArcGIS/ModelBuilder)
# ---------------------------------------------------------------------------
# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
# Load required toolboxes...
gp.AddToolbox("D:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
# Local variables...
GIS_ADMIN_Drillholes = "Database Connections\\GIS_TEST_ADMIN.sde\\GIS.ADMIN.GROUNDWATER\\GIS.ADMIN.Drillholes"
GIS_ADMIN_Drillholes__2_ = "Database Connections\\GIS_TEST_ADMIN.sde\\GIS.ADMIN.GROUNDWATER\\GIS.ADMIN.Drillholes"
# Process: Calculate Field...
gp.CalculateField_management(GIS_ADMIN_Drillholes__2_, "REF_ELEV", "fillGaps(!GRND_ELEV!,str(!REF_ELEV!))", "PYTHON_9.3", "def fillGaps(grnd, ref):\\n if ref:\\n return ref\\n else:\\n return grnd")