An Example of Debugging NOTE_ORD_VIEW PSQL Expression Evaluation Error

An Example of Debugging NOTE_ORD_VIEW PSQL Expression Evaluation Error

Q - When I try to access the NOTE_ORD_VIEW in the PSQL control center, I get this error: "[LNA][Pervasive][ODBC Engine Interface]Expression evaluation error."  See sample screen below.


It does not display any results, but it does display the create statement for the view.

A - "Expression Evaluation Error" typically points to a data issue. After spending some time investigating your data, we found that the cause of the error is due to some garbage records in the NOTE.BTR table. To find these garbage records, you can go to Global Setup -> Utilities -> Print or Purge Orphan Amigos, then choose the following parameters: 

    Type of Amigo to Purge N
    Master File CPORDHDR
    Purge? N 

Then you will get a list of orphan CPORDHDR notes as in the screen below:


The three records that caused the problem are the ones that have the reference number = "00test." We presume these three records are left over from your FedEx person when he/she did the integration test with Elliott.

Why would these three records would be an issue? The SQL statement we used to create this view is as follows:
    Create View NOTE_ORD_VIEW As
    Select NOTES.*, CPORDHDR.* From NOTES, CPORDHDR
    Where NOTE_FILE_NAME = 'CPORDHDR'
    And ORDER_NO = CONVERT(SUBSTRING(NOTE_FILE_REF_NO,1,6),SQL_NUMERIC);

We need to convert the NOTE's reference field to a numeric format in order to join with CPORDHDR's ORDER_NO. Otherwise, you will get an error on data type mismatch. As the PSQL engine tries to convert these records' reference fields from a string value to numeric, it can't do it because "00test" is not numeric, and hence you get the referenced error.

You can resolve this problem by running the "Print or Purge Orphan Amigos" utility above, and answer "Y" to "Purge?"  After that, you will be able to run this view without the error. 




    • Related Articles

    • Notes Security - From Global Setup, Note Type to Supervisory Relationship

      Q - We are in the process of trying to clean up the system as we go along. One thing I can't seem to locate online is how to delete a note. It was created by another user but is no longer valid. It says I don't have permissions to delete the note. I ...
    • Slow PSQL Relational Engine Performance

      Release Date: 12/15/2017 Many users encounter situations where a particular relational engine SQL query can sometimes be slow. This can be complicated to diagnose due to a lot of reasons. Sometimes it's because of a SQL SELECT statement that's not ...
    • Received "Your Computer Does Not Have PSQL 10 or 11 Client " Even though PSQL Client Is Just Installed

      Q: I'm trying to install Elliott on a Windows 8.1 64-bit computer. I've installed both the 32- and 64-bit client version of PSQL v 11 and they both seemed to install fine. I then created the shortcut to EL700.exe on the server but when I click the ...
    • Presales Pending Transaction View

      Release Date: 3/1/24 Version: 8.6 and Above The Presales Pending View application allows the user to view pending Presales transactions. These are presales transactions that are posted but have not been received. The application will bring up a ...
    • How to Use EL850DB.EXE Utility to Create PSQL Databases

      Release Date: 12/4/2018 Modified Date: 06/20/2020 Version: Elliott 8.5 Elliott 8.5 includes an EL850DB.EXE utility to make it easy to create PSQL databases. The new utility EL850DB.EXE is included in the Elliott 8.5 release, and you can find it in ...