Skip to main content

End of Day Errors - SQL Failed, Exception: Column \u0027Ounces\u0027 cannot be null

Distributor fix for the End of Day error "SQL Failed, Exception: Column 'Ounces' cannot be null": find products with blank Ounces or Fluid Ounces per Case in the Products table, enter a value, rerun. Requires v25.03.050+.

B
Written by Bailey Naas-Thornton

Minimum Version Required: 25.03.050

Pre-Conditions

  • Must have active access to the Encompass system with administrative or product management permissions.

  • Must be attempting to run the "End of Day" process.

Steps

How to fix the System Error and Run End of Day when receiving:
​
"SQL Failed, Error: One or more errors occurred: (Column 'Ounces' cannot be null)..."
or

​
"SQL Failed, Exception: Column 'Ounces' cannot be null QueryRunSeconds = 0.020"
​

​

  1. Navigate to Products table: Use the Universal Search Bar to find the Products table.
    ​
    ​

  2. Add the 'Ounces' column: Use the Columns dropdown and add 'Ounces' or 'Fluid Ounces per Case'.
    ​
    ​

  3. Sort the 'Ounces' column: Sort the column 1 -> 9
    ​
    ​

  4. Identify the problematic product(s): The system error message indicates "Column 'Ounces' cannot be null". Use the sorting to find any products that have the ounces column NULL or blank.
    ​
    ​

  5. Edit product details: Open the product record for editing.
    ​
    ​

  6. Enter a valid numerical value: If the 'Ounces' or 'Fluid Ounces per Case' field is blank, enter a valid numerical value. Even if the product doesn't typically have an ounce measurement (e.g., non-liquid items), inputting '0' or '1' should resolve the validation error.
    ​
    ​

  7. Save changes: Save the updated product information.
    ​
    ​

  8. Re-run End of Day: Attempt to run the "End of Day" process again.
    ​
    ​
    ​

If the issue persists:
​
​Contact Support if the Issue Persists: If the "End of Day" process still fails after following these steps, please contact support and provide the following information:

    • Exact error messages or codes encountered (including any new ones).

    • Screenshots or video recordings of the issue, especially the error message.

    • The exact steps taken, including the product ID you updated and the value you entered for 'Ounces'.

    • The date and time the issue was first observed and any recurrence.

    • Any changes made to the system before the issue appeared.

    • The SystemErrorUUID if a new one is generated.

Fields And Definitions

  • End Of Day: A critical accounting process in Encompass that finalizes daily transactions, including invoicing and accounts receivable.

  • Column 'Ounces' cannot be null: An error message indicating that a database field named 'Ounces' is required to have a value but currently contains no data (null).

  • ProductID: A unique identifier assigned to each product within the Encompass system.

  • SQL Failed, Exception: An error indicating that a Structured Query Language (SQL) command, used for database interaction, failed to execute due to an exception.

  • SystemErrorUUID: A Universal Unique Identifier generated by the system when an error occurs, used for tracking and diagnostics.

Best Practices

  • Data Validation: Ensure that all mandatory product fields, especially numerical ones like 'Ounces', have valid data entered during product creation or modification.

  • Regular Data Review: Periodically review product data for completeness and accuracy to prevent similar errors.

  • Test Before Live Run: If possible, test critical processes like End of Day in a test environment after making significant data changes.

Did this answer your question?