Category Archives: Code

Javascript Objects and Methods

I have a lovely form that allows me to add_new records, edit records, or delete records for a database table. What was missing was an extra submit button to allow me to edit an existing record and save it as … Continue reading

Posted in Code, Problems & Fixes | Tagged | Comments Off on Javascript Objects and Methods

Using CF IIF with Javascript Functions

I get bored writing CFIF statements so thought I would try using the old IIF method. Despite the arguments about performance it works quite well if you are not running it through thousands of iterations. I also had need to … Continue reading

Posted in Code, Coldfusion, Snippets | Comments Off on Using CF IIF with Javascript Functions

Penny Rounding

Rounding issues are the bane of every accountants existence. While a few records may only produce a few cents difference a few million records can lead to thousands of dollars or just a penny. Depending on if the rounding occurs … Continue reading

Posted in Code, Snippets, SQL | Comments Off on Penny Rounding

Get last record inserted without primary key or id

Sometimes we need to get the last record inserted into the database. But if there is no primary key, date, or ID field to query we can use a temp table to return the results we need. Example: Table MY_CONTACTS … Continue reading

Posted in Code, Snippets, SQL | Comments Off on Get last record inserted without primary key or id

SQL order by required

There are subtle differences between Oracle, Sybase, mySQL, and SQL Server SQL syntax. Sybase seems to be the most forgiving or loose while Oracle’s and MS SQL Server’s syntax is very strict.

Posted in Code, SQL | Comments Off on SQL order by required