Re: count(*) with parameter

2010-04-18 Thread Florin T.PATRASCU
or something like this: ... String sql = "select count(*) as total_clicks from user_clicks " + " where user_id = #bind( $userId, 'VARCHAR')"; SQLTemplate sqlTemplate = new SQLTemplate( UserClick.class, sql); sqlTemplate.setParameters(params); //params defined elsewhere sqlTempl

Re: count(*) with parameter

2010-04-18 Thread Joe Baldwin
Arnaud, If I understand you, I think you want to do this in the code and not the modeler? Here is a simple code fragment for a like-ignore-case qualifier: String substring = "Martin"; ObjectContext oc = BaseContext.getThreadObjectContext(); Expression exp = ExpressionFa

count(*) with parameter

2010-04-18 Thread Arnaud Garcia
Hello, I am not sure how to create a select count(*) in the modeler when I need to pass a parameter ? I downloaded the petstore example, and it seems that I have to create a "Raw SQL" Query, and directly write my select count(*)... =>but how to I had my parameter in my SQL ? ... then I suppose I