你好!我正在嘗試將8個表組合在一起,並且如果原始表(是excel或JMP數據表)會自動更新。
- 8個表具有相同的列名和屬性,但它們具有不同的數據集,所以我在技術上想做的是將所有這些表連接在一起。
- 我還需要連接的表(供8饋入的表),以便在添加/刪除饋送器表中的數據時進行更新等。
我知道有一個“聯接”可以創建一個數據庫,該數據庫實際上會隨著輸入數據表的更改而更新,但是該函數不能滿足我的需要,因為它只是替換了數據(JMP上的“聯接”函數);它不會串聯。
是否具有虛擬連接8個數據表(最好是excel)的功能,以便如果更改了供料器數據表,則連接的數據表(將所有8個原始數據表組合在一起的數據表)將更新?
先感謝您!
@AU ,
我不知道可以使用JMP內置選項來執行所需的操作,但是SQL主服務器可能具有執行所需的方法。 我不確定您的期望/用例是什麼。
您希望在分析數據時進行更新嗎? 您是否有要更新的分析? 還是希望該文件/分析在一定的時間間隔內更新?
如果您提供了關於期望(嘗試做)的更詳細描述,那麼社區可能能夠為您提供解決方案,即使它不是JMP內置解決方案。
謝謝@ gzmorgan0對於建議,我添加了更多詳細信息。
啊,好的,謝謝:(有點不幸。我對SQL不熟悉,但是如果它簡單/直接,我願意學習/嘗試使用它。
我也不知道有一個類似於虛擬聯接的工具,但是聽起來您可以使用傳統串聯的一個不太複雜的腳本來完成此任務。這是我將開始的一般方法:
Names Default to here(1);
//reference the current data table (the one you are already working in)
dtLatest = current data table();
//list of all source files and variable to hold references to source tables
SourceFile = {"C:\file1.xlsx", "C:\file2.xlsx", ... };
dtSource = list();
//If all files have the same format, use a function to open them all
openfile = Function({fn},
//Open function, copy this from the source script after opening a file interactively
dt = Open(
fn,
Worksheets( "Sheet 1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 1 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
);
dt << New Column(..); //add any more columns, filter or clean data as appropriate
dt;
);
//Open source tables
for( f=1, f<= n items(SourceFile), f++,
dtSource = openfile( SourceFile[f] )
);
//Join all the files together
dtJoined = Concatenate(dtSource);
//Close the source tables
dtSource << Close Window()
//In the source table, delete all rows
dtLatest << Select all Rows;
dtLatest << Delete Rows;
//Concatenate the new rows again
dtLatest << Concatenate( dtJoined );