Creating Oracle triggers from ColdFusion

Here's some sample code you can use if you want to create a table with a corresponding sequence and trigger in Oracle using cfquery tags.

Note that there are no line breaks at all in the SQL that creates the trigger. This is a very important point. If you follow the standard code to do this, which usually has line breaks, you'll end up with invalid triggers in the database. For some reason the line breaks are not handled properly (at least not in ColdFusion 9.0.1 on Windows) and Oracle receives bad SQL.

 

Per Djurner

Per Djurner

Working with ColdFusion, JavaScript, ActionScript, SQL, CSS, HTML and more at SingSnap.

Archive

2012 (1)
2011 (1)
2010 (6)
2009 (1)
| Viewed
times
Posterous theme by Cory Watilo