group by named-function-call

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

group by named-function-call

Michael Lynch

Cannot seem to group by a function, for example:

select COUNT(invoice_prejoin.TRANSACTION_NUMBER) as "Invoice.TRANSACTION_NUMBER", applib.date_to_char('M', invoice_prejoin.INVOICE_DATE)
from DATA_WAREHOUSE_SCHEMA.X_INVOICE_PREJOIN invoice_prejoin  
group by applib.date_to_char('M', invoice_prejoin.INVOICE_DATE)

I get the following error:
Error: From line 1, column 108 to line 1, column 135: Expression 'INVOICE_PREJOIN.INVOICE_DATE' is not being grouped
SQLState:  null
ErrorCode: 0

I believe this is supported based on my reading on the wiki: http://pub.eigenbase.org/wiki/LucidDbSelectExpression and http://pub.eigenbase.org/wiki/LucidDbValueExpression.

Is this supported? 


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev

_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: group by named-function-call

Jeremy Lemaire
I have been able to group by user defined functions but trying the applib function did not work for me either.  I was able to do it this way:

select SUM("Invoice.TRANSACTION_NUMBER") as "Invoice.TRANSACTION_NUMBER", character_date from ( 
	select COUNT(invoice_prejoin.TRANSACTION_NUMBER) as "Invoice.TRANSACTION_NUMBER", applib.date_to_char('M', invoice_prejoin.INVOICE_DATE) as character_date
		from DATA_WAREHOUSE_SCHEMA.X_INVOICE_PREJOIN invoice_prejoin
	group by invoice_prejoin.INVOICE_DATE )  
group by character_date;
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: group by named-function-call

Julian Hyde
I'm looking into this now. It seems to be something to do with the 'SPECIFIC
<name>' clause in the definition of the UDF. If you omit that, the system
correctly recognizes that the two calls to the UDF are structurally
identical.

Can one of you please log a jira case for this?

Julian


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: group by named-function-call

Michael Lynch


Thank you.

Michael Lynch
Software Architect
Integrated Services, Inc.
[hidden email]
www.ints.com
P:503-968-8100
F:503-968-9100


On Wed, Sep 15, 2010 at 12:36 AM, Julian Hyde <[hidden email]> wrote:
I'm looking into this now. It seems to be something to do with the 'SPECIFIC
<name>' clause in the definition of the UDF. If you omit that, the system
correctly recognizes that the two calls to the UDF are structurally
identical.

Can one of you please log a jira case for this?

Julian


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
luciddb-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luciddb-users
Loading...