Okay Richard, I now have a more specific/official answer.
The SQL-2003 02 Foundation (2003-09) document that I referred you to says on its page 152 (part of 5.4 "Names and identifiers", p151) this:
<host parameter name> ::= <colon><identifier>
The <identifier> portion is also used by, and often entirely comprises, things like table and column names. So read this as "same as table name but with leading colon". It also means that whether or not you allow delimited identifiers for table names etc determines whether or not you do for host parameter names too.
And yes, "host parameter name" is the official term to refer to application bind variable names. More generally, "host parameter" refers to the binding variables; there are several other "<host parameter ...>" mentioned in SQL-2003 also.
I think it's in SQL-1999 too, but I haven't checked; in any event, one of the purported advances in 2003 over 1999 is that a whole bunch of bugs were fixed, so it's probably best to refer to just the newer standard's docs.
-- Darren Duncan
------------------
Previously I said...
At 9:20 PM -0400 8/24/04, D. Richard Hipp wrote:
Darren Duncan wrote:
It would help me and a lot of other people the most if you simply supported the ":foo" format for named bind variables.
Perhaps someone can enlighten me as to exactly what that format is? A colon followed by any number of alphanumerics? What about underscores? Does there need to be a second colon terminator? Where can I find specifics?
The short answer to this, I believe, is that this format involves a colon followed by any of the exact same characters that are allowed in standard SQL identifiers such as table or view or column or trigger names.
In your case, just make it the same as what you allow for table names, etc, but there is a single leading colon.
I'm looking up a longer answer now, with references in the SQL standard docs.
Meanwhile, look here: http://www.wiscorp.com/SQLStandards.html
Click on the link "SQL:2003 Documents", which is a zip file of about 1MB in size, containing the full SQL:2003 spec in PDF format.
-- Darren Duncan