phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: Why does this work in MySQL but not Phoenix
Date Wed, 12 Apr 2017 16:27:13 GMT
The non standard @ syntax is not supported by Phoenix: (@rn:= if((@item =
t.item_id) AND (@type = t.type),@rn + 1,
                   if((@item:=t.item_id) AND (@type:=t.type),1,1)

Also, I'd recommend breaking that query up into multiple queries to
pinpoint any other non supported constructs.

On Wed, Apr 12, 2017 at 6:49 AM Cheyenne Forbes <
cheyenne.osanu.forbes@gmail.com> wrote:

> I was using this (http://rextester.com/VXZONO82847) in MySQL but I am not
> able to use it in Phoenix. Basically what the query does is "select only
> one row where a column combination (type and item_id) is common and count
> how many more of the combination exists". It allows me to add the following
> feature to my notifications system "John Brown and 5 others like your post"
>
> Can anyone answer any of these?
>
>    1. Why doesn't it work in Phoenix?
>    2. How can I get that query to work?
>
> Regards,
>
> Cheyenne
>

Mime
View raw message