Odbc Toolkit - connection.sqlinnerjoin


data = sqlinnerjoin (conn, lefttablename, righttablename)
data = sqlinnerjoin (conn, lefttablename, righttablename, "Keys", keys, …)
data = sqlinnerjoin (conn, lefttablename, righttablename, "LeftKeys", keys, "RightKeys", keys, …)

Perform an inner join on two tables.

Performs an inner join equivalent to ’SELECT * from lefttable INNER JOIN righttable ON lefttable.key = rightable.key’.

Inputs

conn

Previously created connection object

lefttablename

Name of lefthand table

righttablename

Name of righthand table

keys

A string or cell array of strings of column names to join against. If specified as Keys, the names will be used on lefthand and rightside of the join. If specified as LeftKeys and RightKeys, keys will be used separately for each side of the table. If no keys are provided, common named columns will be matched between the tables.

propertyname, propertyvalue

Property name/value pairs where known properties are:

MaxRows

Max number of rows to return.

DataReturnFormat

Format to return data in (’table’, ’structure’, ’cellarray’)

Outputs

None

See also: database, odbc, fetch, sqlouterjoin.