I forgot to keep in mind the dataAreaID, I figure you’d catch it Don, but incase anyone else is looking.  

 

BTW you’ll notice searching memo fields in the where clause is not a SQL shortcoming, but an Axapta one.

 

-Preston

 

static void pl_scratch(Args _args)

{

    docuRef                         dr;

    Connection                      con = new Connection();

    Statement                       sqlStmt = Con.createStatement();

    ResultSet                       sqlTable;

    notes                           sqlStr;

    str                             searchWord;

    str                             rangeList;

    str                             dataareaID;

    ;

 

    dataareaID = curExt();

 

    searchWord = "Remark";

 

 

    sqlSTR = strFmt("select recID from docuref where notes like '\%%1\%' AND refCompanyID = '%2'", searchWord, dataareaID);

 

    info(sqlStr);

 

    sqlTable = sqlStmt.executeQuery(sqlSTR);

 

     while (sqlTable.next()){

 

      //build recidList to use in other query

      rangeList = rangeList + (rangeList ? ", " + int2STR(sqlTable.getInt(1)) : int2STR(sqlTable.getInt(1)));

    

     }

    info(rangeList);

 

}



Yahoo! Groups Links

Reply via email to