---
title: "DB2: Bind vs Pre-compilation errors"
description: "Bind time errors and pre-compilation errors in DB2 programs"
url: https://srinimf.com/2012/03/16/db2-bind-time-and-precompile-errors/
date: 2012-03-16
modified: 2026-10-05
author: "Srini"
categories: ["DB2 V10"]
tags: ["Bind time errors", "Pre-compilation Errors", "Precompilation"]
type: post
lang: en
---

# DB2: Bind vs Pre-compilation errors

Two types of errors you can see in DB2 programs. Those are [Bind time](https://srinimf.com/2012/05/20/db2-bind-options-part-2/) 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

- [DB2: How to Fix Cursor Open Error Quickly](https://srinimf.com/2015/10/11/db2-open-cursor-unsuccessful-probable-reasons/)DateOctober 11, 2015
- [DB2 Bind Options – And Their Correct Meaning](https://srinimf.com/2012/05/20/db2-bind-options-part-2/)DateMay 20, 2012
- [How to Write COBOL Program with DB2](https://srinimf.com/2018/03/18/db2-program-preparation/)DateMarch 18, 2018

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2012%2F03%2F16%2Fdb2-bind-time-and-precompile-errors%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2026%2F02%2Fcropped-logo.png%3Ffit%3D96%252C96%26ssl%3D1&description=DB2%3A%20Bind%20vs%20Pre-compilation%20errors)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/03/16/db2-bind-time-and-precompile-errors/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/03/16/db2-bind-time-and-precompile-errors/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/03/16/db2-bind-time-and-precompile-errors/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/03/16/db2-bind-time-and-precompile-errors/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20DB2%3A%20Bind%20vs%20Pre-compilation%20errors&body=https%3A%2F%2Fsrinimf.com%2F2012%2F03%2F16%2Fdb2-bind-time-and-precompile-errors%2F&share=email)
-

### Like this:

Like Loading…
