aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

SQL-02154: Invalid or unset data type for host variable in ANSI Dynamic

SQL-02154: Invalid or unset data type for host variable in ANSI Dynamic
Cause: An ANSI Dynamic SET statement with item name DATA was encountered with out a valid TYPE having been previously set and option mode=ansi was used
Action: With mode=ansi, you must set the TYPE before setting the DATA. Issue a SET statement with correct item TYPE or, for output issue a DESCRBE to set the item type. Or use mode=oracle which allows the type to default to the type of the bind/define host variable

请先 登录 后评论

1 个回答

小智
SQL-02154:ANSI动态中的主机变量无效或未设置数据类型,
.原因:遇到具有项目名称DATA的ANSI动态SET语句,出现先前设置的有效TYPE,并且使用了选项mode = ansi,
.操作:使用mode = ansi,您必须在设置DATA之前设置TYPE。发出具有正确项TYPE的SET语句,或者输出发出DESCRBE来设置项目类型。或者使用mode = oracle,它允许类型默认为bind / define主机变量的类型,
.
请先 登录 后评论