Copy Query

You can modify any query that you own, and copy any query to your own workspace that exists in any user definition to which you belong or that is defined as visible to you. As an alternative to copying definitions, business administrators can change their workspace to that of another user to work with queries that they do not own.

After a query is defined, you can clone the definition with the copy query command.

If you are a Business Administrator with person access, you can copy queries to and from any person’s workspace (likewise for groups and roles). Other users can copy visible queries to their own workspaces.

This command lets you duplicate query definitions with the option to change the value of clause arguments:

copy query SRC_NAME DST_NAME [COPY_ITEM {COPY_ITEM}] [MOD_ITEM {MOD_ITEM}];

  • SRC_NAME is the name of the query definition (source) to be copied.
  • DST_NAME is the name of the new definition (destination).
  • COPY_ITEM can be:
    COPY_ITEMSpecifies
    fromuser USERNAMEUSERNAME is the name of a person, group, role or association.
    touser USERNAME
    overwriteReplaces any query of the same name belonging to the user specified in the touser clause.

    The order of the fromuser, touser, and overwrite clauses is irrelevant, but MOD_ITEMS, if included, must come last.

  • MOD_ITEMs are modifications that you can make to the new definition. For more information, see Modify Query.