Saturday, October 21, 2023

Emojis in SQL for ICM InfoWorks - Appendix A – Error Messages ๐Ÿšซ

 Appendix A – Error Messages ๐Ÿšซ

Handling SQL text involves a series of steps. If a problem arises during any step, an error message appears, and the process terminates. ๐Ÿ›‘

Phases:

  1. Splitting into Keywords ๐Ÿ”: This step breaks down the SQL text into keywords, field names, and other elements. If an issue arises, an error message starting with "error parsing query:" is displayed. Potential errors include:
    • Invalid character at the start of a token. ❌
    • Invalid character after field separator. ⚠️
  2. Handling and Splitting Clauses ➗: The SQL text is divided into clauses separated by semi-colons. The clauses are then numbered for easier error identification. Errors in this phase include:
    • Repeated use of a keyword within a clause. ๐Ÿ”
    • Incorrect combination of keywords. ❎
    • Improper ordering of sub-clauses. ๐Ÿ”„
    • Invalid table names after specific keywords. ๐Ÿšซ
    • Incorrect syntax in SET clause. ⛔
  3. List Clauses ๐Ÿ“œ: Errors related to defining list clauses include:
    • Duplicate variable definition. ๐Ÿ”„
    • Invalid list format. ❌
    • Mismatch in data types within a list. ⚠️
    • Unrecognized date format in a list. ๐Ÿ“…
  4. Scalar Assignments ๐Ÿ“Š: Errors during scalar assignments involve:
    • Duplicate variable definition. ๐Ÿ”
    • Unrecognized date format. ๐Ÿ“…
    • Excessive length of LET clause. ❎
    • Invalid data type assignment to scalar variables. ⚠️
  5. Handling Individual Clauses ๐Ÿง: During this phase, errors are reported with the clause number and the sub-clause name for clarity. Errors include:
    • Misplacement of equal sign. ❌
    • Unexpected comma. ⚠️
    • Incorrect bracket usage. ๐Ÿšซ
    • Invalid function names or parameters. ❎
    • Improper use of aggregate functions. ⛔
    • Incorrect use of the AS keyword. ๐Ÿšซ
  6. Checking Validity of Variable and Field Names ✅: Errors in this phase concern the validity of variable and field names. They include:
    • Unrecognized field names. ❌
    • Improper use of the asterisk (*). ⚠️
    • Misuse of list variables. ๐Ÿ“œ
    • Undefined variables. ❓
    • Mismatch in variable usage context. ⛔
    • Unrecognized date format. ๐Ÿ“…

Additional Notes ๐Ÿ“:

  • Forgetting the dollar sign in variable names in a LIST clause will produce an error. ๐Ÿ’ฒ❌
  • If a query only defines list variables, a message indicating no actions will be taken is shown. ๐Ÿšซ

Copyright: Wallingford Software 2010 ๐Ÿ“„๐Ÿ”’

No comments:

AI Rivers of Wisdom about ICM SWMM

Here's the text "Rivers of Wisdom" formatted with one sentence per line: [Verse 1] ๐ŸŒŠ Beneath the ancient oak, where shadows p...