Hi,
I'm using database connectivity toolset to retrieve data from a database using ODBC. I am trying to run this complex query:
SELECT ibmcu, shdoco, shdcto, shshan, abalph, SDDSC1, SDDSC2, t3rcto, t3amtv, t3rmk2, t3rmk, imsrtx, ibanpl, sdlitm, walotn from PRODDTA.F4211, PRODDTA.F4201, PRODDTA.F4101, PRODDTA.F4102, PRODDTA.F0101, PRODDTA.F00092, PRODDTA.F4801 WHERE shdoco=sddoco AND shdcto=sddcto AND sditm=t3sbn1 AND sditm=ibitm AND SHRORN=STR(WADOCO) AND shshan=aban8 AND TRIM(ibmcu)='FULL' AND T3SDB='I' AND T3TYDT='TP' AND shdoco=3 AND shdcto='E' AND walotn = '2'
When i don't use TRIM function, i don't get any error, but it doesn't return any data. I need to use TRIM to retrieve data, but i get fol
lowing error:
Error -2147217900 occurred at Conn Execute.vi
Possible reasons:
Exception occured in Microsoft OLE DB Provider for ODBC Drivers, [Microsoft][ODBC SQL Server Driver][SQL Server]'TRIM' is not a recognized function name.. in Conn Execute.vi->Fetch_DeviceInfo_DB_AIE.vi
I don't know the reason. How can I solve this. Is there something wrong with the SQL query itself?
Thanks