I am using R package RODBC to connect HANA. One of the columns is like a long integer, but actually used as a string such as 2772161413309, 4239530000000239. SQL takes such data as integers. In R, these numbers are shown in scientific notation like 2.77136e+12. my code that pick up some values from this column is:
> a <- sqlQuery(ch,paste(' SELECT "_tmSum"."/BIC/ZTMCARDNO"
FROM "SAPB1P"."/BIC/AZ_RT_A212" "_tmSum"
WHERE "_tmSum"."/BIC/ZTMCARDNO">0 AND "_tmSum"."CALDAY" BETWEEN',StartDate,'AND',EndDate,' '))
I have the following error information:
[1] "S1000 339 [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;339 invalid number: [6930] exception 6930:\nims_search_api/Search/PartSearchImpl.cpp:427\nattribute value is not a number\n"
[2] "[RODBC] ERROR: Could not SQLExecDirect ' SELECT \"_tmSum\".\"/BIC/ZTMCARDNO\"\n FROM \"SAPB1P\".\"/BIC/AZ_RT_A212\" \"_tmSum\"\n
Here, "_tmSum"."/BIC/ZTMCARDNO" is the comlumn including long integers. I want to consider it to be string and pick up some values that is not 0.