Hi,
I guess the "SQuirreL client" thought that the statements ends at the ";"
character. What you could do is replace "$$" with a single quote, because
I'm quite sure the "SQuirreL client" will understand that. But then you
need to ensure, if you use single quotes within the Java source code, to
double them (two single quotes instead of one single quote).
CREATE ALIAS REVERSE AS ' String reverse(String s) { return new
StringBuilder(s).reverse().toString(); } ';
Regards,
Thomas
On Wed, Oct 16, 2013 at 9:04 AM, Noel Grandin <[email protected]> wrote:
> Your code seems to be missing some stuff, notably the closing parts of
> the method and the SQL statement.
>
>
> On 2013-10-15 22:14, [email protected] wrote:
>
>
> When creating a function as source code, using $$ instead of single quote
> causes syntax error:
>
> Error: Syntax error in SQL statement "CREATE ALIAS REVERSE AS [*]$$
> String reverse(String s) { return new
> StringBuilder(s).reverse().toString()" [42000-172]
> SQLState: 42000
> ErrorCode: 42000
> Error occured in:
> CREATE ALIAS REVERSE AS $$ String reverse(String s) { return new
> StringBuilder(s).reverse().toString()
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.