Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Madi — — source: Informix-list mailing list archive (1991-1998)
}
} INFORMIX-4GL - Application.
} INFORMIX-OnLine - Server.
}
} Text of program:
}
} ...
} CREATE VIEW s_phone AS
} SELECT phone.*
} FROM phone
} WHERE phone.owner = USER
} ...
}
} Runtime error:
}
} SQL statement error number -217.
} Column (user) not found in any table in the query.
}
I had the same problem
What I did is created a procedure like:
create procedure "gtm".user_nm()
returning char(20);
return USER ;
end procedure;
and in the view I used
(your example)
} CREATE VIEW s_phone AS
} SELECT phone.*
} FROM phone
} WHERE phone.owner = user_nm ()
Which works !!
}
} But USER is built-in function! Next SQL-statement should not produce error:
}
} SELECT phone.*
} FROM phone
} WHERE phone.owner = USER
}
}
} I have no problem using such program with INFORMIX-SE.
}
} Who can help me to understand this?
}
I can't help.
+--------------------------+---------------------------+
| G.T.Madavan, | e-mail: gtmad@smi.mn.org |
| Systems Migration Inc., | Phone : (612) 890-0040 |
| Burnsville, MN, U.S.A | Fax : (612) 890-0966 |
+--------------------------+---------------------------+
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.