簡體   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