-1
    INSERT INTO MINING STRUCTURE [Market Basket]
(
   [OrderNumber],[Product] (SKIP, [Model])
)
SHAPE {
  OPENQUERY([ContosoRetailDW],'SELECT OrderNumber
            FROM V Online Sales Order ORDER BY OrderNumber')}
APPEND
( 
  {OPENQUERY([ContosoRetailDW],'SELECT OrderNumber, Model FROM 
    dbo.V_OnlineSalesOrder ORDER BY OrderNumber, Model')
}
RELATE OrderNumber to OrderNumber 
) AS [Product]

it gives that error message--

OLE DB error: OLE DB or ODBC error: Incorrect syntax near 'Sales'.; 42000.

what is wrong??

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
arslan
  • 45
  • 2
  • 2
  • 6

1 Answers1

0

Your SQL syntax is wrong.

Near the word "Sales". You probably misspelled a relation name.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194