Index: src/hg/instinct/raToDb/raToDb.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/instinct/raToDb/raToDb.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -B -U 4 -r1.8 -r1.9
--- src/hg/instinct/raToDb/raToDb.c	12 Apr 2010 02:29:30 -0000	1.8
+++ src/hg/instinct/raToDb/raToDb.c	12 Apr 2010 18:22:03 -0000	1.9
@@ -408,8 +408,18 @@
 	slNameAddHead(&missing, table);
 	continue;
 	}
 
+    struct slName *fields = sqlFieldNames(conn, table);
+    if (!slNameInList(fields, valField))
+	{
+	printf("  WARN\t%s\tTable '%s' does not contain field '%s'.\n", 
+	       ra->name, table, valField);
+	slNameFreeList(&fields);
+	continue;
+	}
+    slNameFreeList(&fields);
+
     safef(query, sizeof(query), "select %s,%s from %s limit 1", 
 	  keyField, valField, table);
     if (!sqlExists(conn, query))
 	{

