Hi,
SHAPE Query is a Data Mining Extension Command. It combines queries from multiple data sources into a single hierarchical table (that is, a table with nested tables), which becomes the case table for the mining model.
Example:
You can use the following example within an INSERT INTO (DMX) statement to train a model containing a nested table. The two tables within the SHAPE statement are related through the OrderNumber column.
SHAPE {
OPENQUERY([Adventure Works DW],'SELECT OrderNumber
FROM vAssocSeqOrders ORDER BY OrderNumber')
} APPEND (
{OPENQUERY([Adventure Works DW],'SELECT OrderNumber, model FROM
dbo.vAssocSeqLineItems ORDER BY OrderNumber, Model')}
RELATE OrderNumber to OrderNumber) references:
http://sqlmag.com/business-intelligence/shaped-recordsets
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f80399db-d89b-4890-b566-afeea7ebef06/shape-query
Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif
Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator