Zoomed Image

AMSX Scripting Language - Command : createtablecopy

Summary

Create a copy of a database table, optionally seeded with rows

Description

Creates a new temp table with the same structure as the source table. If a WHERE clause is supplied the matching rows are copied; if blank the new table is created empty. The destination table name must include a database qualifier (i.e. must reference the xAssets temp database).

Parameters

ParameterDescription
cmddestination table name (must contain a dot, e.g. $tempdb$MyTable)
Argument 0source table name to copy structure (and optionally data) from
Argument 1WHERE clause to select rows to copy (leave blank to create an empty table)

Syntax


CreateTableCopy "destination table name (must contain a dot, e.g. $tempdb$MyTable)", "source table name to copy structure (and optionally data) from", "WHERE clause to select rows to copy (leave blank to create an empty table)"

Return to the AMSX Command Reference