UPDATE: See the latest version of this article here.
A characteristic error is an error that is so easy to make that it appears you are being actively encouraged to make it by the very nature of the computer program you are using.
For example, sending an email without the attachment is a characteristic error of all email programs.
...except Gmail. Gmail warns you about missing attachments... Gmail is magic!Here are some errors that are characteristic of SQL in general, and SQL Anywhere in particular.
- SQL: Seeing too little data, or no data at all, because a predicate in the WHERE clause effectively turned your OUTER JOIN into an INNER JOIN.
- SQL: Seeing too much data because a missing predicate effectively turned your INNER JOIN into a CROSS JOIN.
- SQL: Getting the wrong COUNT() or SUM() because you forgot to code WHERE ... IS NOT NULL, or you *did* code it when you shouldn't have.
- SQL: Getting the wrong answer because you forgot that, in general, NULL values [cough] suck.
- SQL Anywhere: Not seeing MESSAGE output because you forgot to run SET TEMPORARY OPTION DEBUG_MESSAGES = 'ON';
- SQL Anywhere: Not seeing any data because you forgot ON COMMIT PRESERVE ROWS or NOT TRANSACTIONAL.
- SQL Anywhere: Coding ENDIF where END IF was required, or vice versa (before Version 11).
- SQL Anywhere: Connecting to the wrong server because you forgot DOBROAD=NONE (before Version 12).
- SQL Anywhere: Forgetting the asterisk in SELECT TOP 10 FROM ...
- SQL Anywhere: Coding IF NOT VAREXISTS ( 'x' ) THEN ... instead of IF VAREXISTS ( 'x' ) = 0 THEN ...
- SQL Anywhere: Coding the wrong magic numbers 1, 2, 3, ... in the get_value() and set_value() calls in an EXTERNAL C DLL function.
- SQL Anywhere: Getting proxy table ODBC errors because the engine's running as a service and you've set up a User DSN instead of System DSN.
- SQL Anywhere: Getting file-related errors because the file specifications are relative to the server rather than the client.
- SQL Anywhere: Getting file-related errors because the engine's running as a service without the necessary permissions.
- SQL Anywhere: Coding CREATE TRIGGER IF NOT EXISTS instead of CREATE OR REPLACE TRIGGER, or vice versa for CREATE TABLE (in 11.0.1 or later).
- SQL Anywhere: Getting integer arithmetic when you wanted fractional parts because you forgot to CAST.