AnsweredAssumed Answered

R  language and ODBC

Question asked by CSCT64 on Feb 13, 2017
Latest reply on Feb 20, 2017 by jyi



I 'm trying to connect to odbc provider by R language,


odbc test connect is ok,


but  R debug message show that:


[1] "HY000 0 [PIOLEDB] Catalog name 'IntegratingPISystemAndR' is invalid."                                                                                                                                                                                                                                                                                                                                                                                                                                                               

[2] "[RODBC] ERROR: Could not SQLExecDirect 'SELECT ea.Name As Name, Format(i.Time, \n\t'MMM-dd-yyyy HH:mm:ss'),

i.Value\n\tFROM [IntegratingPISystemAndR].[Asset].[ElementHierarchy] eh\n\tINNER JOIN [IntegratingPISystemAndR].

[Asset].[ElementAttribute] ea\n\tON ea.ElementID = eh.ElementID,\n\t[IntegratingPISystemAndR].[Data].[ft_InterpolateRange]

i\n\tWHERE i.ElementAttributeID = ea.ID \n\tAND i.StartTime = '1-Oct-2016' \n\tAND i.EndTime = '7-Oct-2016' \n\tAND

i.TimeStep = '1h' \n\tOPTION (FORCE ORDER, EMBED ERRORS)'"


Please suggest me the best way to do this



attached flies: error message and source code