Description
Builds and executes a create table query.
Usage
## S3 method for class 'Teradata' db_save_query( con, sql, name, temporary = FALSE, table.type = "PI", primary.index = NULL, ... )
Arguments
con |
Required Argument. |
sql |
Required Argument. |
name |
Required Argument. |
temporary |
Optional Argument. |
table.type |
Optional Argument. |
primary.index |
Optional Argument. |
... |
Other parameters passed to methods. |
Value
Returns name of newly created remote table.
See Also
db_compute()
Examples
# Get remote data source connection. con <- td_get_context()$connection # Save iris dataset into table 'db_save_query_test'. iris2 <- copy_to(con, iris, name = "db_save_query_test", overwrite = FALSE) sql <- "select * from db_save_query_test" # Create PI table from the result set of "sql". db_save_query(con, sql, "db_save_query_test1", temporary = FALSE, table.type = "PI", primary.index = c("Petal.Length","Species"))