I am using the SQL below in the AftExportToDat event script, and I am receiving a data access error message(2147467259). The error log states ORA-00936 - Missing Expression.
strSQL = "SELECT PartLastExpFile FROM tPOVPartition WHERE PartName=" & strLoc
If I hard code the location name, then the SQL works
strSQL = "SELECT PartLastExpFile FROM tPOVPartition WHERE PartName= 'LOC1' "
Can anyone point out my error?
Thanks for the reply, I made the corrections with the quotes. As a result, I am getting an 'Either BOF or EOF is True' error. I am putting the script in the reply, so that is visible to everyone.
strSQL = "SELECT PartLastExpFile FROM tPOVPartition WHERE PartName='" & strLoc & "'"
set rs = DW.DataAccess.farsFireHose(strSQL,False)
strExpFileName = rs.fields("PartLastExpFile")
Set rs = Nothing
I think you may find that because the farsfireHose generates a record set (albeit with a single record) you still need to go through the standard process of reading through the file
If not rs.eof or rs.bof
do while not rs.eof
lastfilename = xxxxx
Edited by: user10757003 on 07-Nov-2012 12:04
It seems a bit strange that the RES.pstrloc works as per the script defined earlier, but if you use strloc then you need the added processing to read the record set created. (I tried both options and got both to work). Is there any obvious reason that i am missing / overlooking as to why there is a difference, as these sort of tips and examples are always useful?
Edited by: user10757003 on 08-Nov-2012 02:51