Plug-in Reference — Structures — JOIN_INFO

# JOIN_INFO

Used by EE_JOIN message.

    typedef struct _JOIN_INFO {
    	UINT cbSize;
    	UINT flags;
    	LPCWSTR pszDocument1;
    	LPCWSTR
    	pszDocument2;
    	LPCWSTR pszColumn1;
    	LPCWSTR pszColumn2;
    	LPCWSTR pszSelect;
    	UINT iDocument3;
    } JOIN_INFO;

## Fields

cbSize

Specifies the size of this structure, sizeof( JOIN_INFO ).

flags

Specifies a combination of the following values.

JOIN_FLAG_UNIQUE_KEY_1 | The specified column in the first document contains a unique key.
JOIN_FLAG_UNIQUE_KEY_2 | The specified column in the second document contains a unique key.
JOIN_FLAG_INCLUDE_ALL_1 | All lines in the first document should be included in the output. The output document will contain empty cells if lines in the first document do not have matches.
JOIN_FLAG_INCLUDE_ALL_2 | All lines in the second document should be included in the output. The output document will contain empty cells if lines in the second document do not have matches.
JOIN_FLAG_MATCH_CASE | Matches cases.
JOIN_FLAG_SIMPLE_JOIN | Merge two documents without comparing keys. If this is specified, pszColumn1 and pszColumn2 parameters are ignored.
JOIN_FLAG_IGNORE_HEADINGS_1 | Ignore headings in the first document so that headings from the first document are retained in the merged document.
JOIN_FLAG_IGNORE_HEADINGS_2 | Ignore headings in the second document.
JOIN_FLAG_CONTAIN | Key1 contains Key2.
JOIN_FLAG_START_WITH | Key1 starts with Key2.
JOIN_FLAG_END_WITH | Key1 ends with Key2.
JOIN_FLAG_MATCH_SPLIT_BOTH | Both split strings match.
JOIN_FLAG_MATCH_SPLIT_ONE | Key1 matches split Key2.
JOIN_FLAG_FUZZY | Uses fuzzy matching. This flag cannot be combined with JOIN_FLAG_END_WITH, JOIN_FLAG_MATCH_SPLIT_BOTH, or JOIN_FLAG_MATCH_SPLIT_ONE. This flag makes the process slower.
JOIN_FLAG_SWAP | Swaps Key1 and Key2 if JOIN_FLAG_CONTAIN, JOIN_FLAG_START_WITH, JOIN_FLAG_END_WITH, or JOIN_FLAG_MATCH_SPLIT_ONE is also specified.

pszDocument1

Specifies the string to identify the first document. This value can be a file name, file name with the full path, or a colon (:) followed by the index of the document in the current group. For example, "filename.csv", "C:\data\filename.csv", or ":2".

pszDocument2

Specifies the string to identify the second document. The format of this value is the same as pszDocument1.

pszColumn1

Specifies the string to identify the key column of the first document. This value can be either the first line of the column or a colon (:) followed by the index of the column. For example, "first_name" or ":5".

pszColumn2

Specifies the string to identify the key column of the second document. The format of this value is the same as pszColumn1.

pszSelect

Specifies the string to select which columns to include in the output document. For example, "file1.csv>column1,file2.csv>column2". Use '+' instead of ',' to concatenate with the previous column, and '|' to use the first non-empty value.

iDocument3

This field will be filled with the index of the output document when the function returns.

## Version

Supported on EmEditor Professional Version 14.8 or later.