Teradata 中获取列参数不存在错误

发布于 2025-01-20 16:44:13 字数 199 浏览 4 评论 0原文

update t1
from 
table1 t1,
table2 t2
set
t1.active_ind=0,
t1.row_status_cd='L'
where
t2.col1
is NULL

尽管这些字段在 t1 中可用,但 Teradata SQL 中出现“列/参数表 1.t1 不存在”错误。有人可以帮我解决这个问题吗?

update t1
from 
table1 t1,
table2 t2
set
t1.active_ind=0,
t1.row_status_cd='L'
where
t2.col1
is NULL

Getting "Column/ parameter table 1.t1 doesnt exists" error in Teradata SQL though those fields are available in t1 . can anybody help me to resolve this please?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

超可爱的懒熊 2025-01-27 16:44:13

由于您只需更新 table1,因此不需要在 tne SET 中的列名之前添加 t1,这就是您收到错误的原因。

但 table1 和 table2 之间不应该存在关系,但一如既往,您应该在使用它之前先测试它,wquery 可能会产生不可预见的副作用

update t1
from 
    table1 t1,
    table2 t2
set
    active_ind=0,
    row_status_cd='L'
where
    t2.col1 is NULL

As you only have to update table1 you don't need the t1 before the columnnames in tne SET, that is why you get the error.

but shouldn't there be a relation between table1 and table2, but as always you should test this first before using it, that wquery could have unforseen side effects

update t1
from 
    table1 t1,
    table2 t2
set
    active_ind=0,
    row_status_cd='L'
where
    t2.col1 is NULL
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文