On Transact SQL language the Msg 1002 Level 16 - Specified scale is invalid means that the scale value is greater than the maximum value.
Msg 1002 Level 16 Example:
Invalid select:
SELECT TIMEFROMPARTS ( 16, 13, 23, 7, 1 ) as 'Col 1',
TIMEFROMPARTS ( 14, 13, 23, 70, 2 ) as 'Col 2',
TIMEFROMPARTS ( 14, 13, 23, 700, 30 ) as 'Col 3';
Message |
---|
Msg 1002, Level 16, State 2, Line 1 |
Line 3: Specified scale 30 is invalid. |
Correct select:
SELECT TIMEFROMPARTS ( 16, 13, 23, 7, 1 ) as 'Col 1',
TIMEFROMPARTS ( 14, 13, 23, 70, 2 ) as 'Col 2',
TIMEFROMPARTS ( 14, 13, 23, 700, 3 ) as 'Col 3';
Col 1 | Col 2 | Col 3 |
---|---|---|
16:13:23.7 | 14:13:23.70 | 14:13:23.700 |
Other error messages:
- Foreign key references invalid column in referenced table
- Table already has a primary key defined on it
- Column name does not exist in the target table or view
- Violation of PRIMARY KEY constraint
- Column names in each table must be unique
- There is already an object named in the database
- Could not find stored procedure