Re: Strange Informix error
Posted in 2004
Chris Bullivant wrote:
> I have an ORACLE background but for the last year I've working at a
> site that also has Informix - so I am self-taught but the teacher
> doesn't know much ;-)
>
> I'm using On-Line 7.31.UC6.
> In dbaccess, I go into INFO and choose my table. When I select Columns
> this is what I get:
> Column name Type Nulls
>
> msisdn varchar(16,0) yes
> rec_type char(2) yes
> upd_year_month datetime year to month yes
> rec_count integer yes
> ... < 7 integer columns here>
> charge_unit integer yes
> air_charge integer yes
> surcharges integer yes
>
> When I go into Status, this is what I get:
> 217: Column (surcharges) not found in any table in the query (or SLV
> is undefined).>
> Presumably Status calls a view(?) which can't find the column, but how
> does Columns think it's there in the first place?
>
> Also, select count(*) from <table>; gives the same error.
>
> I'm thinking that the Data Dictionary has an error. How could this
> happen, and how do I fix it?
>
> I tried finderr 217 but it focuses on errors in my SQL statements.
>
> Any help would be appreciated.
>
> Thanks,
> Chris Bullivant
I haven't tested, but it looks like your accessing a view with an invalid definition...
Probably dbaccess will look at view definition (stored in the systables) to show you the columns and this works.
When you go into status it probably does a select count(*) and this forces the engine to "materialize" the view. When it does this it finds that the view definition became invalid.
Check this before other options.
Regards.