---
title: "DB2-SQL Errors -300,-301,-302,-303,-304"
description: "As a routine, I am listening to mind music. Then I got an idea to write a post on DB2 SQL errors starts with 3**. Recently, I found some errors, while writing  SQL query . The major part of your..."
url: https://srinimf.com/2012/02/08/sql-errors-300-301-302-303-304/
date: 2012-02-08
modified: 2026-10-05
author: "Srini"
categories: ["SQL"]
tags: ["DB2 SQL Error Codes", "DB2 Tips and Solutions"]
type: post
lang: en
---

# DB2-SQL Errors -300,-301,-302,-303,-304

As a routine, I am listening to mind music. Then I got an [idea to write](https://srinimf.com/2012/05/02/db2-fetch-rules/) a post on DB2 SQL errors starts with 3**.

Recently, I found some errors, while writing [SQL query](https://srinimf.com/2020/01/29/sqlquery-joins-how-to-write-with-using/).

The major part of your work is writing SQL query. So when you complete this work, you are good to go ahead.

#### Let me give an example:

```
Select Digits(Bill_TAX_1)
    into :WS-BILL-TAX
from A_Table A INNER JOIN B_Table B
ON A.Invoice_id = B.Invoice-id
Where A.Cust_Name = 'Test1'
  AND B.Bill_Number = '180000'
```

Here, :WS-BILL-TAX ===> Output [host variable](https://srinimf.com/2011/12/11/db2hostvariable/)
      :WS-Bill-date ===> Input host variable

Data-types of these input/output [host variables](https://srinimf.com/2018/05/10/4-top-db2-host-variable-points/)  must  match to the [table column data](https://srinimf.com/2022/01/01/how-to-create-type-data-type-in-plsql/) types ( char to char, integer to numeric, comp to comp etc), else, you will get these kind of errors.

The errors -300,-301, -302, -303,-304 usually occur with host-variable related issues.

### 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%2F02%2F08%2Fsql-errors-300-301-302-303-304%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-SQL%20Errors%20-300%2C-301%2C-302%2C-303%2C-304)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/02/08/sql-errors-300-301-302-303-304/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/02/08/sql-errors-300-301-302-303-304/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/02/08/sql-errors-300-301-302-303-304/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/02/08/sql-errors-300-301-302-303-304/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20DB2-SQL%20Errors%20-300%2C-301%2C-302%2C-303%2C-304&body=https%3A%2F%2Fsrinimf.com%2F2012%2F02%2F08%2Fsql-errors-300-301-302-303-304%2F&share=email)
-

### Like this:

Like Loading…
