Over the past few months I’ve ventured out of my cave of comfort to attempt to learn something new or revisit something I used to know.
I wanted to normalize text entered by users so that I could collect stats. So I SQL’d something like this… select count(1) as total, upper(nvl(resp,’NO RESPONSE’)) as resp from forms.form_field_resp where ffid=#id# group by upper(nvl(resp,’NO RESPONSE’)) order by total desc But I didn’t want to display the text in all CAPS BECAUSE THAT’S PRETTY DANG ANNOYING. So I rigged this to set the very first character to upper case and then replace every character after […]
Rather than creating insert and update queries in ColdFusion against an Oracle database, this function can generate the code for you. I haven’t added cfqueryparam to check the datatypes, but that would be ideal at helping prevent SQL Injection attacks.
If you use table and column comments, you can create an Oracle function that will create insert and update forms for you complete with table formatting and data type form fields that are limited to the number of chars in a column.