How to Use this Query in Sql server

Posted by Jayakumars under Sql Server on 10/30/2013 | Points: 10 | Views : 765 | Status : [Member] [MVP] | Replies : 3
Hi
1.What is Shape Query in Sql server and use of this which situation we need shape query?

shape query in sql server 2008

Mark as Answer if its helpful to you


Responses

Posted by: Bandi on: 10/30/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
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

Posted by: Bandi on: 10/30/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
For detailed description and uses of SHAPE Command refer the following link
http://support.microsoft.com/kb/189657

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

Posted by: Allemahesh on: 10/30/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
You can see the below link:-

http://support.microsoft.com/kb/189657

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response