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

    • 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 ...
    • Btrieve Error Codes 001 - 199

      MicroKernel (Btrieve) Database Engine Status Codes This section describes status codes that the MicroKernel returns. All status codes are provided in 3-digit formats since the search on this website cannot search 1 or 2-digit words correctly. That is ...
    • Feature - Events for Add Note and Delete Note

      Release Date - 02/27/2016 We have added support for event types ADDNOTE and DELNOTE to the Elliott System level code. These two events are management events to which you can subscribe by going to Elliott Main Menu -> Global Setup. See example screen ...
    • Btrieve Error Codes 3100 - 3199

      Network Services Layer Status Codes The following status codes originate from the Pervasive Network Services Layer (PNSL). 3103: Server name not found by Pervasive Network Services Layer The search for a target server name was unable to resolve an ...
    • Configure PSQL Server Memory Usage

      Version: Any Release Date: 12/17/2021 Q - Can you tell us why PSQL process is taking up so much memory? Is there anything we can do? See sample screen below: A - PSQL server by default can take up about 60ish% of the server memory. This is ...