Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import schema for numeric types fail if scale is greater than precision #207

Closed
chetank-yb opened this issue Aug 4, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@chetank-yb
Copy link
Contributor

chetank-yb commented Aug 4, 2022

Source table

create table numeric_size(
   num_min number(1,-84),
   num_max number(38,127),
   numeric_min numeric(1,-84),
   numeric_max numeric(38,127),
   float_val FLOAT(5),
   dec_min_Val dec(1,-84),
  dec_max_Val dec(38,127),
  decimal_min_Val decimal(1,-84),
 decimal_max_Val decimal(38,127)
);

IMPORT SCHEMA ERROR

importing   TABLE
  ERROR: NUMERIC scale 127 must be between 0 and precision 38 (SQLSTATE 22023)
  STATEMENT: CREATE TABLE numeric_size (
	num_min real,
	num_max decimal(38,127),
	numeric_min real,
	numeric_max decimal(38,127),
	float_val double precision,
	dec_min_val real,
	dec_max_val decimal(38,127),
	decimal_min_val real,
	decimal_max_val decimal(38,127)
) ;

ERROR: NUMERIC scale 127 must be between 0 and precision 38 (SQLSTATE 22023)
@kneeraj kneeraj added documentation Improvements or additions to documentation GA1.0 labels Aug 17, 2022
@amit-yb amit-yb assigned rahulb-yb and unassigned amit-yb Aug 19, 2022
@rahulb-yb
Copy link
Collaborator

YB does not allow numeric/decimal values to have scale greater than precision. As of now, the user has to manually remove this explicit declaration of both scale and precision:

num_max decimal(38,127) -> num_max decimal

Additional details can be found in the manual review document: https://docs.google.com/document/d/1ZzPGdn2tSHdbqzQ4b-WdXFRedLaiQqun5osV1vAG-CY

@shubham-yb shubham-yb changed the title [ORACLE] Import schema for numeric types fail with the message NUMERIC scale 127 must be between 0 and precision 38 (SQLSTATE 22023) Import schema for numeric types fail if scale is greater than precision Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants