EXECUTE

The EXECUTE Command is used to execute a SQL statement against the current TARGITDB, much the same as with ‘ME’, storing the results back into the TARGITDB.

Syntax:

EXECUTE table_to_store_results_as = { some_SQL_command in curly bracks }

Example:

EXECUTE Combined_Sales = {SELECT 2.0 as currency_factor, 
[order details].UnitPrice AS unit_price,
[Order Details].Quantity,
[Order Details].costprice,
Orders.CustomerID,
Orders.EmployeeID,
Orders.ShipVia,
[Order Details].ProductID,
Products.CategoryID,
Products.SupplierID,
Orders.OrderID,
Orders.OrderDate
FROM [Order Details]
INNER JOIN Orders ON [Order Details].OrderID = Orders.OrderID
INNER JOIN Products ON [Order Details].ProductID = Products.ProductID
}
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.