... but when using the comma as decimal point (like here in Europe), you
NEED an extra blank after the comma separator in an SQL function.
Example: Dec(MyFld, 3, 0) or Dec(MyFld , 3 , 0)  will work, but
Dec(MyFld,3,0) will not because 3,0 is interpreted as single value (i.e.
3.0)
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von CRPence
Gesendet: Wednesday, 15.8 2012 22:52
An: midrange-l@xxxxxxxxxxxx
Betreff: Re: Help with SQL script
   FWiW: The SQL parser does not care about "white space" [or lack of] in
that, nor many other cases.  Extraneous blanks are overlooked during
parsing, anywhere I can think of, before or after either a closing or
opening parenthesis.  Each of the following should always pass without
syntax errors [using SQL naming]; that two statements are SELECT versus
CREATE, is immaterial for the purpose of making the point:
      create table QTEMP    . FOO( T DECIMAL    (1)default 7 )
      select DECIMAL  ( 1 / 3 , 6 , 6 )from SYSIBM . SYSDUMMY1
      select RAND     (    )    from SYSIBM  .   SYSDUMMY1
Regards, Chuck
On 15 Aug 2012 11:38, rob@xxxxxxxxx wrote:
I bet that it doesn't like the space between decimal and the 
parenthesis. The ( is pos 31. <<SNIP>>
On 15 Aug 2012 08:50, James Lampert wrote:
<<SNIP>>
 334 create table SM_Addresses
 335 (
 336    address_id         NUMERIC(20),
 337    type               INTEGER,
  ...
 345    logtitude          Decimal (%10,%7),
  ...
SQL0104  30     345  Position 31 Token ( was not valid.
Valid tokens: AS NO FOR NOT FILE WITH CCSID CHECK LOGGED UNIQUE  
COMPACT DEFAULT.
<<SNIP>>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at 
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.