繁体   English   中英

嗨,我已经制作了这个 tcl 脚本来通过在数据库中使用 mql 来查找 id,但是我的脚本不起作用

[英]Hi i have made this tcl script to find the ids by using mql in the database, but my script is not working

下面是 TCL 脚本我不确定脚本是否可以帮助我解决问题。

我收到一个错误 - 应该是“proc name args body”

tcl;
proc {
    puts "########### Trying to find the Id's ###########"
         mql start transaction
        
         set Id {mql temp query bus 'AIRBUS_E_Document_ElectricalDiagram' * * where 'attribute[clau*].value==FALSE' select id;}
         
        set error[Catch {proc $Id} sResult]
        
        If {$error == 0}{
           puts "$Id"
        }else{
           puts "Error -$sResult"
         mql abort transaction
        }
           puts "######## Finding Id's are Completed #########"

}

如果这里需要更改,请告诉我。

  1. proc文档——缺少 procname 和 arglist
  2. if文档
    • Tcl 是一种面向单词的语言,因此命令的参数由空格分隔是至关重要的
      • If {$error == 0}{ ==> if {$error == 0} {
      • }else{ ==> } else {
  3. set error[Catch {proc $Id} sResult]
    • 再次,“错误”后缺少空间
    • 我不知道你想在这里做什么。

另请参阅Tcl 语法规则——只有 12 条规则,所以请花点时间阅读它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM