[firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
Hi,   i know this kind of cast SELECT CAST('1.23' AS NUMERIC(10, 2)) FROM RDB$DATABASE   but what are the rules for this (numeric without parenthesis) [1] SELECT CAST('1.23' AS NUMERIC) FROM RDB$DATABASE result is 1   [2] SELECT CAST('12345678.23' as numeric) FROM RDB$DATABASE result is 12345678  

RE: [firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread Rand Random rand.ran...@outlook.com [firebird-support]
Only the negative range goes to 2147483648 and you used positive value which is ranged till 2147483647, so this should work SELECT CAST('-2147483648' as numeric) FROM RDB$DATABASE SELECT CAST('-2147483648' as numeric(9,0)) FROM RDB$DATABASE To: firebird-support@yahoogroups.com From:

RE: [firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
I would expect numbers in the range -2147483648 to +2147483647 to be accepted (the size of an integer), and then there’s a separate field for storing whether things are shifted to the left or right. I’ve no experience or theoretical knowledge confirming this, but your examples would fit such a

Re: RE: [firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
then why here is an error?   SELECT CAST('123456789.23' as numeric) FROM RDB$DATABASE   result should be 123 456 789 is less then 2 147 483 647 i assume this, because this working:   SELECT CAST('12345678.23' as numeric) FROM RDB$DATABASE SELECT CAST('123456789' as numeric) FROM RDB$DATABASE   PS.

Re: [firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread Tim Ward t...@telensa.com [firebird-support]
On 26/03/2015 12:35, Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support] wrote: Here, I find that SELECT CAST(123456789.12345678 as decimal) FROM RDB$DATABASE succeeds, whereas SELECT CAST(123456789.123456789 as decimal) FROM RDB$DATABASE fails. I don't know why.

RE: [firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
then why here is an error?   SELECT CAST('123456789.23' as numeric) FROM RDB$DATABASE Logically speaking I don't understand why SELECT CAST('123456789.23' as numeric(9,0)) FROM RDB$DATABASE is failing when SELECT CAST('1.23' as numeric(1,0)) FROM RDB$DATABASE succeeds. Practically, I guess

Re: [firebird-support] Cast as Numeric without parenthesis

2015-03-26 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 26-3-2015 09:26, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] wrote: Hi, i know this kind of cast SELECT CAST('1.23' AS NUMERIC(10, 2)) FROM RDB$DATABASE but what are the rules for this (numeric without parenthesis) [1] SELECT CAST('1.23' AS NUMERIC) FROM RDB$DATABASE

Re: [firebird-support] Fwd: Firebird MON$STATEMENTS table MON$TRANSACTION_ID field [null]

2015-03-26 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 26-3-2015 14:33, Resul Demirok resul.demi...@gmail.com [firebird-support] wrote: I have try to get sql text from active transaction. I had got some sql text but some sql text is empty. I searched reason and i undertastand mon$statements table mon$transaction_id is null and some transaction

[firebird-support] Fwd: Firebird MON$STATEMENTS table MON$TRANSACTION_ID field [null]

2015-03-26 Thread Resul Demirok resul.demi...@gmail.com [firebird-support]
-- Forwarded message -- From: Resul Demirok resul.demi...@gmail.com Date: 2015-03-26 15:07 GMT+02:00 Subject: Firebird MON$STATEMENTS table MON$TRANSACTION_ID field [null] To: firebird-support-subscr...@yahoogroups.com Hi, I have try to get sql text from active transaction. I

AW: [firebird-support] coalesce

2015-03-26 Thread 'checkmail' check_m...@satron.de [firebird-support]
Okay, Thanks @ll! It was in fact a char instead a varchar item. Von: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] Gesendet: Mittwoch, 25. März 2015 22:11 An: firebird-support@yahoogroups.com Betreff: RE: [firebird-support] coalesce one short