locked
Simple LIKE not working - ? RRS feed

  • Question

  • User451945003 posted

    C_Comments for some of my records contains " VB Downturn"  or " NR Downturn"

    I am trying to select only those with "VB" anywhere in the C_Comments field

    Tried (and several other combinations all getting no results).

    WHERE (((Companies.C_Comments) Like '%VB%' ) And ((Companies.C_Sub)>0) And ((CLinkInfo.L_State)="VA"));
    WHERE (((Companies.C_Comments) Like '%' + "VB" '%' ) And ((Companies.C_Sub)>0) And ((CLinkInfo.L_State)="VA"));
    WHERE (((Companies.C_Comments) = '%' + "VB" + '%' ) And ((Companies.C_Sub)>0) And ((CLinkInfo.L_State)="VA"));

    The below worked if I remove everything except VB from the C_Comments field.

    WHERE (((Companies.C_Comments) LIKE "VB" ) And ((Companies.C_Sub)>0) And ((CLinkInfo.L_State)="VA"));

    where are the trees in this forest?

    Thursday, March 5, 2009 3:46 PM

Answers

  • User451945003 posted

    Just found the answer - ACCESS 2007 requires the  * instead of the %

     

    Sorry for the trouble

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 5, 2009 4:39 PM