By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,276 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,276 IT Pros & Developers. It's quick & easy.

AS400/DB2 table view compatibility

P: 1
Hello,
If anyone knows a trick...thanks
Philippe

I want to create a table view on AS/400 which have a column which is not referenced in a table.

With the AS/400 SQL gui, I create the table view with the following statement:
create view GAG
as select
char('xxxxx', 10) As FIELD1,
qqparm as FIELD2
from QAQQINI

Checking the field FIELD1:
- on AS/400 I get a CHAR(10) and I read 'xxxxx' values.
- by DB2/400 I get a BINARY(10) and I read '??' values.

Now creating the table view on AS/400 with the same statement but with DB2/400:
create view GAG
as select
char('xxxxx', 10) As FIELD1,
qqparm as FIELD2
from QAQQINI

Let's check the field FIELD1:
- on AS/400 I get a CHAR(10) and I still read 'xxxxx' values.
- by DB2//400 I now get CHAR(10) with the correct 'xxxxx' values.

What's wrong when the table is directly created with AS/400 SQL ?
Sep 14 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.