The query I start out with has 40,000 lines of empty rows, which stems from a problem with the original spreadsheet from which it was taken.
Using CF16 server
I would like to do a Query of Queries on a variably named 'key column'.
In my query:
var keyColumn = "Permit No."
var newQuery = "select * from source where (cast('#keyColumn#' as varchar) <> '')";
Note: the casting comes from this suggestion
I still get all those empty fields in there.
But when I use "City" as the keyColumn, it works. How do the values in both those columns differ when they both say [empty string] on the query dump?
Is it a problem with column names? What kind of data are in those cells?

where col is NOT NULL? What kind of data are in those cells Dump it and find out. Something likewriteDump(yourQuery.columnName[rowNum].getClass().name). Might also check the value lengths to see if it really is an empty string.java.lang.Stringin a cell like 23 with[empty string].is not nullcheck didn't change anything. Thanks for pointing out the getClass functionjava.lang.String. Should I rename columns first? Rebuild the query?LEN( queryName["colName"][rowNum] ). BTW, did you see my question about syntax?