Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

The current Help says "scale ... The default setting is 6."

That is not always true.

The Help should say this instead: "scale ... If precision and scale are both omitted, the default scale is 6. If precision is specified but scale is omitted, the default scale is 0."

BEGIN
DECLARE x DECIMAL ( 20 );
DECLARE y DECIMAL ( 20, 0 );
DECLARE z DECIMAL;
DECLARE a DECIMAL ( 30 );
SELECT EXPRTYPE ( 'SELECT x', 1 ), 
       EXPRTYPE ( 'SELECT y', 1 ),  
       EXPRTYPE ( 'SELECT z', 1 ),  
       EXPRTYPE ( 'SELECT a', 1 );
END;

EXPRTYPE('SELECT x',1),EXPRTYPE('SELECT y',1),EXPRTYPE('SELECT z',1),EXPRTYPE('SELECT a',1)
decimal(20,0),decimal(20,0),decimal(30,6),decimal(30,0)

asked 03 Apr '20, 15:15

Breck%20Carter's gravatar image

Breck Carter
32.5k5417261050
accept rate: 20%

...and now the help does tell so (at least within DCX):

(15 Apr '20, 11:37) Volker Barth
Replies hidden
1

Thank you, Volker (and jbschueler!) ...I'm sure it'll appear in the SAP Help Portal real soon :)

(15 Apr '20, 14:00) Breck Carter

I really appreciate the German-labelled stamps... Bürokratie rocks:)

(15 Apr '20, 16:28) Volker Barth
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×3

question asked: 03 Apr '20, 15:15

question was seen: 628 times

last updated: 15 Apr '20, 16:28