0

I need some help in using "like" condition in Subsonic 2.2

Following is my query

DAL.DB.Select()
    .From("tblName")
    .Where("NewFirstName")
    .Like(strFirstName)
    .Or("PrevFirstName")
    .Like(strFirstName)
    .ExecuteDataSet();

the result returned by above query contains records those have firstname euqal to strFirstName not like strFirstName

example: there are two records which has NewFirstName as 'joe' and 'joe J' so above query just returns record that has 'joe' as NewFirstName .

TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188

2 Answers2

2

Did you try this : strFirstName = 'joe*' or strFirstName = 'joe%' ?

ykatchou
  • 3,667
  • 1
  • 22
  • 27
0

You seem to be misunderstanding how the LIKE operator works.

Perhaps you should peruse the documentation.

quentin-starin
  • 26,121
  • 7
  • 68
  • 86