# Right

Join 與 Keep 前置詞可接在 right 前置詞之後。

若加在 join 之前，即指定應該使用右聯結。產生的表格只會包含原始資料表格中的欄位值組合，其中第二個表格會呈現連結欄位值。若加在 keep 之前，是指定第一個原始資料表應先減少到與第二個表格的共同交集，然後才儲存到 QlikView 中。

資訊備註您在尋找使用相同名稱的字串函數嗎？請參閱： [Right - 指令碼與圖表函數](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/StringFunctions/Right.htm)

語法：

Right (Join | Keep) [(tablename)](loadstatement |selectstatement )

引數：

表格載入引數

| 引數 | 描述 |
| --- | --- |
| tablename | 要與載入的表格進行比較的具名表格。 |
| loadstatement 或 selectstatement | 用於載入表格的 LOAD 或 SELECT 陳述式。 |

範例：

Example 1A

| Table1 | - |
| --- | --- |
| A | B |
| 1 | aa |
| 2 | cc |
| 3 | ee |

Example 1B

| Table2 | - |
| --- | --- |
| A | C |
| 1 | xx |
| 4 | yy |

`QVTable:` `SQL SELECT * 
 from table1;` `right join 
 SQL SELECT * from table2;`

Example 1C

| QVTable | - | - |
| --- | --- | --- |
| A | B | C |
| 1 | aa | xx |
| 4 | - | yy |

`QVTab1:` `SQL SELECT  * 
 from Table1;` `QVTab2:` `right keep 
 SQL SELECT * from Table2;`

Example 1D

| QVTab1 | - |
| --- | --- |
| A | B |
| 1 | aa |

Example 1E

| QVTab2 | - |
| --- | --- |
| A | C |
| 1 | xx |
| 4 | yy |

keep 範例中的這兩個表格當然是透過 A 關聯。

` tab1:  ` `LOAD * from 
 file1.csv;` `tab2:` `LOAD  * from 
 file2.csv;` ` .. .. ..  ` `right keep 
 (tab1) LOAD * from file3.csv;`

## 瞭解更多資訊

* [Join](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Join.htm)
* [Keep](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Keep.htm)
* [Inner](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Inner.htm)
* [Outer](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Outer.htm)
* [Left](https://help.qlik.com/zh-TW/qlikview/September2025/Subsystems/Client/Content/QV_QlikView/Scripting/ScriptPrefixes/Left.htm)