Please do not post newbie questions on the developers&#39; list, use <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>.<br><br>Rules have mandatory keywords such as &quot;rule&quot;, &quot;when&quot;, &quot;then&quot;, &quot;end&quot;. Read the manual, please.<br>
<br>-W<br><br><br><div class="gmail_quote">On 28 October 2010 18:46, DDUGGAN <span dir="ltr">&lt;<a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Can someone point me in the direction of examples using queries??  I have a<br>
simple query and rule that I cannot get operational.<br>
<br>
<br>
<br>
query &quot;IKnow&quot;<br>
    oRecord : MyRecord( status == &quot;IKnow&quot; )<br>
end<br>
<br>
rule &quot;Print My Records&quot;<br>
    no-loop true<br>
    dialect &quot;java&quot;<br>
    QueryResults $Results = ksession.getQueryResults( &quot;IKnow&quot; );         **<br>
    System.out.println( &quot;We have &quot; + results.size( ) + &quot; Records&quot; );<br>
<br>
    for ( QueryResultsRow row : results )<br>
**<br>
    {<br>
        MyRecord $oRecord = ( MyRecord ) row.get( &quot;oRecord&quot; );         **<br>
        System.out.println( $oRecord.toString() + &quot;\n&quot; );<br>
    }<br>
end<br>
<br>
<br>
** - I get no viable alternative at input on these 3 lines.  Usually missing<br>
) or &quot; but I don&#39;t see an issue.<br>
<br>
Thanks!<br>
<font color="#888888">--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/query-examples-tp1787542p1787542.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/query-examples-tp1787542p1787542.html</a><br>

Sent from the Drools - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
</font></blockquote></div><br>