6 Replies Latest reply on Jan 21, 2014 2:32 PM by Francisco Amores

    SQL Insert Into error on import in FDM

    User607524-OC

      Hi,

      I am struggling to run a FDM Integration script to import data from SQL table to send to HFM. Error on import -

      Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'openquery'. Error during data import

       

      Below is the script:

      strSQL = "insert into " & strWorkTableName & "("

      strSQL = strSQL & "PartitionKey, CatKey, PeriodKey, DataView, CalcAcctType,DataValue, Account,Entity,ICP)"

      strSQL = strSQL & "Select " & RES.PlngLocKey & "," & RES.PlngCatKey & ","

      strSQL = strSQL & Day(RES.PdtePerKey) & "-" & MonthName(Month(RES.PdtePerKey), True) & "-" & Year(RES.PdtePerKey) & ","

      strSQL = strSQL & "YTD,9,Value,Account,Entity,Inter_Company_Entity_HFM"

      strSQL = strSQL & "from openquery(dw_foundation.dbo.FOU_GL_ACTUAL_MTO,"

      strSQL = strSQL & "Select Amount, Account, Entity,Event,Period"