DB2: Bind vs Pre-compilation errors

Two types of errors you can see in DB2 programs. Those are Bind time errors and pre-compilation errors.

When the syntax errors validated

Two possibilities are present. Based on the parameter you chose – Validate(Bind)/Validate(Run) options.

Precompile validation:

All the SQL errors except those mentioned in the WHERE clause and INTO will be validated during pre-compilation time.

Bind time validation:

The WHERE clause and INTO syntax will be validated during BIND time. This is an example for BIND time errors.

See the sample query:

Select col_1 
INTO :Column-bFrom 
Table_1 aTable_2 b
where a.account_id=b.account_ida.prod_code='B'.

Related Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.