Posterita Best Practices

From ADempiere ERP Wiki

Jump to: navigation, search

1. Use String Buffer

  • Make use of String Buffer when writing sql statements
 E.g.:   String strSQL = new String ("SELECT fieldname");
           strSQL.append("FROM tablename");
           strSQL.append("WHERE criteria");

2. Parameterization of SQL Statements

  • Make use of parameterized sql statements

3. Conversion of SQL Statements

  • Do not use Oracle Conventions for writing SQL Statements
 For e.g.: NVL, +, || ||
  • Learn SQL 92 Syntax for database dependencies
  • Make use of a single standard for date and time
 For e.g. Either 01/01/2007 12:00:00 or 01-Jan-2007 12:00:00

shameem 09:49, 16 March 2007 (EDT)

Personal tools