Hi All,
When I'm trying to import the bulk data by insert_recordset using below query.
"insert_recordset tradeChartTable (value, PricePlan)
select sum(value), PricePlan from tradeForecastView
group by PricePlan"
Then system throwing below error.
"Cannot execute a data definition language command on KepTradeForecastDataView (KepTradeForecastDataView).The SQL database has issued an error.."
I have checked the eventVwr, there it's given below information.
Incorrect syntax near the keyword 'AS'.. The SQL statement was: "SELECT SUM(T1.VALUE) AS f1,T1.PRICEPLAN AS f2, AS f3,N'kep' AS DATAAREAID,1 AS RECVERSION,IDENTITY(bigint,1,1) AS RECID INTO [##ax_tmp_kep3_87_104040] FROM KEPTRADEFORECASTDATAVIEW T1 WHERE ((DATAAREAID=?) AND (((PRICEPLAN<>?) AND (PRICEPLAN<>?)) AND (EANID=?))) GROUP BY T1.PRICEPLAN ORDER BY T1.PRICEPLAN.
here I don't know why AS f3 came.
Some other findings and information.
My View is a UnionQuery Based view.
My target table is Regular table.
If I change my target table as InMemory table, query is working fine.
Please let me know what I'm missing here, or give me the information why its not working for Regular table.
--
Nunna