Please add a command for renaming query columns without having to rebuild the entire query.

I'm working with some ugly flat files that use headers with spaces in them. This blows up query of queries, which works really well with 's great additions.

I need to loop through the column name list replacing spaces with _, and that would be much more elegant if there were a command to do this.


Julian Halliwell
February 26, 2021, 8:17 AM

Nice work, Zac.

Zac Spitzer
February 26, 2021, 8:15 AM

agreed, in the code it was called that. my test hits the undocumented function

coding before my second column, i mean coffeee :)

updating the PR, task title updated

Julian Halliwell
February 26, 2021, 8:02 AM

I'm not sure I agree with the naming. Yes, there are existing BIFs that begin queryColumn..., e.g. queryColumnCount, but they all just return information rather than changing it.

BIFs that change queries are in the form queryACTION, e.g.

So I would prefer queryRenameColumn, or queryRenameColumns as suggested in my blog post.

Julian Halliwell
February 26, 2021, 7:47 AM

As a workaround, you can use square brackets around the fields with spaces in your QoQ. See https://blog.simplicityweb.co.uk/125/renaming-cfml-query-columns (which I wrote before knowing about this ticket).


Michael Offner


John Wilson