I tried putting single quote like following, it does not work.
deletedPkQuery="select p.pId as id from products p join products_large
pl on p.pId=pl.pId where p.pId= '${dataimporter.delta.id}' and
pl.deleted='' having count(*)=0"

I don't have quotes in where p.pId =${dataimporter.delta.id} for my
deltaImportQuery and there is no problem there.
The pId is a INT in my db. Why do i need to put quotes around it? Is this a
special requirement for deletedPkQuery?

Thanks.

Elaine

On Thu, Jul 14, 2011 at 4:53 PM, Shalin Shekhar Mangar <
shalinman...@gmail.com> wrote:
> On Thu, Jul 14, 2011 at 1:39 AM, Elaine Li <elaine.bing...@gmail.com>
wrote:
>
>> Hi Folks,
>>
>> I am trying to use the deletedPkQuery to enable deltaImport to remove
>> the inactive products from solr.
>> I am keeping getting the syntax error saying the query syntax is not
>> right. I have tried many alternatives to the following query. Although
>> all of them work in the mysql prompt directly, no one works in solr
>> handler. Can anyone give me some hint to debug this type of problem?
>> Is there anything special about deletedPkQuery I am not aware of?
>>
>> deletedPkQuery="select p.pId as id from products p join products_large
>> pl on p.pId=pl.pId where p.pId= ${dataimporter.delta.id} and
>> pl.deleted='' having count(*)=0"
>>
>
> You need to put the ${dataimporter.delta.id in quotes.
>
> --
> Regards,
> Shalin Shekhar Mangar.
>

Reply via email to