364,036 Members | 5377 Browsing Online
Community for Developers & IT Professionals
Bytes IT Community

DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704

tmugavero
P: n/a
tmugavero
Hello,

This is my first time starting a topic here so I hope this is the right
place. I am having problems running SQL queries on a Version 8 DB2
database for Windows Server using the type 4 driver. I get a connection
but when I run a query, I get this error:

DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704

For example if my query was "SELECT * from TABLE" , I would get the
error:

"DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 DB2ADMIN.TABLE" [SELECT
* FROM IDSC.TABLE]

I looked at the error codes online and they do not provide me with any
information I did not already know. Any help would be greatly
appreciated.

Kindest Regards,

Tony

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


Mark A
P: n/a
Mark A
"tmugavero" <tmugavero@gmail.com> wrote in message
news:1127167175.888556.152740@g44g2000cwa.googlegr oups.com...[color=blue]
> Hello,
>
> This is my first time starting a topic here so I hope this is the right
> place. I am having problems running SQL queries on a Version 8 DB2
> database for Windows Server using the type 4 driver. I get a connection
> but when I run a query, I get this error:
>
> DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704
>
> For example if my query was "SELECT * from TABLE" , I would get the
> error:
>
> "DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704 DB2ADMIN.TABLE" [SELECT
> * FROM IDSC.TABLE]
>
> I looked at the error codes online and they do not provide me with any
> information I did not already know. Any help would be greatly
> appreciated.
>
> Kindest Regards,
>
> Tony
>[/color]

If the userid you are using is db2admin, and you don't supply a high level
qualifier on the table name, the DB2 assumes that DB2ADMIN is the qualifier
(schema) name. You can use the SET SCHEMA statement before hand, use an
alias, or use the a userid with the same name as your schema.


Nov 12 '05 #2

Post your reply

Help answer this question



Didn't find the answer to your DB2 Database question?

You can also browse similar questions: DB2 Database db2 204 42704 db2 42704 db2 sqlcode sqlcode sqlstate