Langref - Expressions/Constant

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Langref - Expressions/Constant

Michał Ziemski
Hi!

I've been going through the beta langref.
In fblangref25-commons-expressions there is a description for "Constant":
"A number; or a string literal enclosed in apostrophes"

This should also include string literat with encoding provided, like:
_utf8 'abc123' or _win1250 'abc123'

It would be also helpful to expand somewhat on constant number format that
 - dot is the decimal spearator
 - exponential notation is supproted (like 2.3e-5)

Cheers!
Michał

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs
Reply | Threaded
Open this post in threaded view
|

Re: Langref - Expressions/Constant

firebirdlists
Re: [Firebird-docs] Langref - Expressions/Constant Hello ,

Monday, February 1, 2016, 8:25:55 PM, Michał Ziemski wrote:


Hi!

I've been going through the beta langref.
In fblangref25-commons-expressions there is a description for "Constant":
"A number; or a string literal enclosed in apostrophes"

This should also include string literat with encoding provided, like:
_utf8 'abc123' or _win1250 'abc123'


The "introducer syntax" for forcing the character set of string literals is
actually discussed in the DML chapter, under the INSERT statement.
However, I agree with you, it should be in the "Common Elements", since it
is not restricted to INSERT statements.  Other discussions should link to
that.




It would be also helpful to expand somewhat on constant number format that
- dot is the decimal spearator
- exponential notation is supproted (like 2.3e-5)


Amazingly, so far everyone except you has overlooked that
exponential notation for numeric constants is valid but missing.

And yes, I agree it is worth including a note that the "dot" character
is the only valid decimal separator in SQL...and probably also that thousands
separators (be they comma, dot or space) are not valid at all.

Some more good catches!

Cheers,
Helen



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs
Reply | Threaded
Open this post in threaded view
|

Re: Langref - Expressions/Constant

Michał Ziemski
Hi!



Hi!

I've been going through the beta langref.
In fblangref25-commons-expressions there is a description for "Constant":
"A number; or a string literal enclosed in apostrophes"

This should also include string literat with encoding provided, like:
_utf8 'abc123' or _win1250 'abc123'


The "introducer syntax" for forcing the character set of string literals is
actually discussed in the DML chapter, under the INSERT statement.
However, I agree with you, it should be in the "Common Elements", since it
is not restricted to INSERT statements.  Other discussions should link to
that.

A few more ideas to clarify string constants:
 - abyility to include an apostrophe in sring by using 2 apostrophes: 'john''s car'
 - I'd stress thet only an apostrophe is allowed and double quotest serve other purpose - 
this is isn't always the case in other DBs (MS Access for example) and I remember
having problem with it myself when I was yet new to FB.

Column name expression:
 - Firebird converts table/column names to upper case internally. I think
this should be explicitly stated as it's, I believe, failrly unique to firebird
 - double quotes can be used to make the field case sensitive and allow for
some wild characters inside the symbol (spaces, parentheses and so on)
 - it'd be convenient to state which characters are allowed in a symbol name
and which are allowed in a quoted symbol name

Cheers!
Michał

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs
Reply | Threaded
Open this post in threaded view
|

Re: Langref - Expressions/Constant

firebirdlists
Re: [Firebird-docs] Langref - Expressions/Constant Tuesday, February 2, 2016, 8:29:57 PM, Michal Ziemsk wrote:


Column name expression:
- Firebird converts table/column names to upper case internally. I think
this should be explicitly stated as it's, I believe, failrly unique to firebird
- double quotes can be used to make the field case sensitive and allow for
some wild characters inside the symbol (spaces, parentheses and so on)
- it'd be convenient to state which characters are allowed in a symbol name
and which are allowed in a quoted symbol name


Did you miss the section "Identifiers" in Chapter 2? (pdf p. 22).

HB


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs
Reply | Threaded
Open this post in threaded view
|

Re: Langref - Expressions/Constant

Mark Rotteveel-2
In reply to this post by Michał Ziemski
On Tue, 2 Feb 2016 08:29:57 +0100, Michał Ziemski <[hidden email]> wrote:
> Column name expression:
>  - Firebird converts table/column names to upper case internally. I
think
> this should be explicitly stated as it's, I believe, failrly unique to
> firebird

A lot of database systems do that for case insensitive names (some
lowercase instead).

Mark


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs
Reply | Threaded
Open this post in threaded view
|

Re: Langref - Expressions/Constant

Michał Ziemski
In reply to this post by firebirdlists
Hi!

I must have missed that :)
Maybe it's worth linking to this article in the "Column expression row"?

Cheers!
Michał

2016-02-02 9:49 GMT+01:00 Helen Borrie <[hidden email]>:
Tuesday, February 2, 2016, 8:29:57 PM, Michal Ziemsk wrote:


Column name expression:
- Firebird converts table/column names to upper case internally. I think
this should be explicitly stated as it's, I believe, failrly unique to firebird
- double quotes can be used to make the field case sensitive and allow for
some wild characters inside the symbol (spaces, parentheses and so on)
- it'd be convenient to state which characters are allowed in a symbol name
and which are allowed in a quoted symbol name


Did you miss the section "Identifiers" in Chapter 2? (pdf p. 22).

HB


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs
Reply | Threaded
Open this post in threaded view
|

Re: Langref - Expressions/Constant

Lester Caine
In reply to this post by Michał Ziemski
On 02/02/16 07:29, Michał Ziemski wrote:
> Column name expression:
>  - Firebird converts table/column names to upper case internally. I think
> this should be explicitly stated as it's, I believe, failrly unique to
> firebird

I don't believe that the SQL standard has changed any time recently.
While it would be nice to be able to download copies of an international
standard without digging into one's wallet, Upper case names is what the
standard calls for. Along with using double quotes to wrap reserved
words and case sensitive ones. Showing just how compliant Firebird is
over other databases would perhaps be a worthwhile exercise.

I did do a scan to see what was available on-line today,
http://stackoverflow.com/questions/1714461/ansi-sql-manual makes nice
reading and the suggestion that the standard postdates the databases
seems a little strange when MySQL did not appear until 1995, while the
first ANSI standard was published in 1986, a couple of years after
Interbase appeared. Even today, the SQL1999 documents are still a
preferred base, but I think SQL2011 is the current version, and I
understand a printed copy makes a nice stool? Certainly not an evening
read ... if you can afford a copy at something over $2000 :(

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Firebird-docs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/firebird-docs