Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [teneo] How to specify formula with oracle || concat
[teneo] How to specify formula with oracle || concat [message #1022415] Thu, 21 March 2013 16:40 Go to next message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
Hi,
is there a way to specify a formula that concats two columns within a teneo annotation?

Example:
@Formula(value="FIRST_NAME || ' ' || LAST_NAME")


Where FIRST_NAME and LAST_NAME are columns in the table.

I get:

Value not closed with double quote, see the _ for the location @Formula(value=_"FIRST_NAME || ' ' || LAST_NAME")


I have also tried other combinations with "+" and masks etc.

Thanks
Thorsten
Re: [teneo] How to specify formula with oracle || concat [message #1022452 is a reply to message #1022415] Thu, 21 March 2013 18:49 Go to previous messageGo to next message
Martin Taal is currently offline Martin Taal
Messages: 5326
Registered: July 2009
Senior Member
Hi Thorsten,
I guess it gets confused by the single quotes in there. Can you retry without the ' ' ?
If it works then it is a bug/missing feature, please enter a bugzilla in that case.

gr. Martin

On 03/21/2013 09:40 PM, Thorsten Schlathölter wrote:
> Hi,
> is there a way to specify a formula that concats two columns within a teneo annotation?
>
> Example:
> @Formula(value="FIRST_NAME || ' ' || LAST_NAME")
>
> Where FIRST_NAME and LAST_NAME are columns in the table.
>
> I get:
>
> Value not closed with double quote, see the _ for the location @Formula(value=_"FIRST_NAME || ' ' || LAST_NAME")
>
> I have also tried other combinations with "+" and masks etc.
>
> Thanks
> Thorsten


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [teneo] How to specify formula with oracle || concat [message #1022599 is a reply to message #1022452] Fri, 22 March 2013 04:03 Go to previous message
Thorsten Schlathölter is currently offline Thorsten Schlathölter
Messages: 208
Registered: February 2012
Location: Düsseldorf
Senior Member
I have already tried all combinations that came to my mind including:

@Formula(value="FIRST_NAME + LAST_NAME")
@Formula(value="FIRST_NAME  LAST_NAME")
@Formula(value="FIRST_NAME \|\| ' ' \|\| LAST_NAME")
@Formula(value="FIRST_NAME || || LAST_NAME")


The second one compiles but in the sql the columns are not concatenated, so it throws an sql exception. All others complain about double quote not closed.

As you requested I filed a bug:

Regards,
Thorsten
Previous Topic:[Texo] Retrieve children
Next Topic:EMFStore Hello World example
Goto Forum:
  


Current Time: Mon Jul 28 02:20:37 EDT 2014

Powered by FUDForum. Page generated in 0.02172 seconds