2

My client has a table on their IBMi with a foreign key to another table. It's not showing up with a SELECT * FROM lib.table. However, if I specifically mention it in the column list. It does show up.

SELECT
        col1, col2.col3, fxcolid
    FROM  lib.table

I'm using the jt400 driver to query from SQLWorkbench/J.

5

There is an IMPLICITLY HIDDEN column attribute that can be applied. Please check for this...

This means the column will only appear when it is explicitly specified on the SELECT statement.

Check the CREATE TABLE statement for this property, or materialize the TABLE's DDL using some API or tool, such as RTVSQLSRC.

  • I was stupid. It was actually long (what shows up in STRSQL results on the green screen) versus short table names. See my self answer. – Justin Dearing Sep 23 '15 at 18:38
1

It appears to be long column name versus short column name. Upon closer inspection the hidden column always had the same value as an unhidden one. Since the long name in this case was abbreviated and cryptic, I didn't make that connection right away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.