如何在jsl中執行join後刪除列?例如,
dte << Join(
With(dtf),
By Matching Column(:Y = :Y ),
Preserve main table order(1),
output table("Joined Table");
);
運行此腳本後,會產生一個新表,其中包含兩個表中的“Y”列,但在加入後我想刪除這些列。 他們的名字每次都不一樣。 例如,「Y of Untitled 50」和「Y of Untitled 51」。 如何刪除這些欄位? 謝謝
Re: 如何在jsl中執行join後刪除列?這裡有幾個選項:
- 這加盟經營將允許您指定將哪些列輸出到結果表。 這可能比事後嘗試清理更容易。 以互動方式執行連接,選擇要輸出的列,然後檢查來源腳本中的 JSL 語法。
- 這刪除列()訊息採用名稱或列號。
Re: 如何在jsl中執行join後刪除列?1. 您需要閱讀腳本指南。
幫助==>腳本指南
它會告訴您在大多數情況下可以按名稱或數字引用列。
2.你需要自己去嘗試,
dtx << delete columns(3);
工作得很好
Re: 如何在jsl中執行join後刪除列?感謝您的回覆@tx尼爾森但是有沒有辦法刪除,例如表中的第 3 列?
Re: 如何在jsl中執行join後刪除列?這是可以做到這一點的程式碼
dtx = dte << Join(
With( dtf ),
By Matching Column( :Y = :Y ),
Preserve main table order( 1 ),
output table( "Joined Table" )
);
dtx << delete columns( {"Y of Untitle 50", "Y of Untitled 51"} );
如果您在加入平台中使用了「合併同名列」元素,則可以簡化刪除程式碼
dtx = dte << Join(
With( dtf ),
By Matching Column( :Y = :Y ),
Preserve main table order( 1 ),
output table( "Joined Table" ),
Merge same name columns(1)
);
dtx << delete columns( {"Y"} );