Append a Range to the SQL Where clause where the Range does not apply to a field in the current table but a field in another table where the main table just holds the primary key.

<example> <para> If you wanted to filter tables from a Client table based on the CreateUser and the Client table only holds the primary key field of the Users you would do something like this: </para> <para> AppendRangeWithPk("Client.UserPk", "User", "UserId", "Pk", "Admin,BD,JB") </para> </example>

Syntax

ISSqlWhereBuilder.AppendRangeWithPk(pkFieldName, remoteTableName, remoteFieldName, remotePkFieldName, range, [dataType], [notRange])

Parameters

NameTypeOptionalByRefDescription
pkFieldName String The name of the Pk field in the current table including the table name, e.g. Client.CreatedUserPk.
remoteTableName String The table in which the Range field exists, e.g. User.
remoteFieldName String The field name to compare to in the remote table i.e. the Id field, NOT the Pk field, e.g. UserId.
remotePkFieldName String The name of the Pk field in the remote table, e.g. Pk.
range String The Range.
dataType iseRangeDataType Optional The underlying data-type of the compare field. If omitted, a value of iseRangeDataType.String is assumed.
notRange Boolean Optional Indicates whether this Range should be prefixed by NOT so that it is excluded rather than included. If omitted, a value of False is assumed.
Member of:
ISSqlWhereBuilder
Namespace:
Intersoft.ISSupport6
Assembly:
ISSupport6, Version=6.0.3
Target Framework:
.NET 9.0