Re: The like clause of sql



SELECT Tablename.*
FROM Tablename
WHERE Tablename.FieldName Like "*" & "YourText" & "*";

--

Ken Snell
<MS ACCESS MVP>


"sefs" <sefsinc@xxxxxxxxx> wrote in message
news:ujl0%23T4OFHA.1392@xxxxxxxxxxxxxxxxxxxxxxx
>I have a table that consist of rows of one field.
>
> like this
>
> 1) firstitem
> 2) thisitem
> 3) thatitem
>
> I want to compare the values in the table against another value, and if
> the
> any value in the table is included as part of the other value of that
> other
> value i am comparing it against its selected.
>
> For example
>
> If i compare firstitme against lalalalfirstitemlalala
> then the first row is added to the selected list and so on.
>
> What is the statemnt I should use with the LIKE clause
>
> Best regards.
>
>


.



Relevant Pages

  • Re: The like clause of sql
    ... SELECT Tablename.* ... then we would be saying select all records where firstitem LIKE ... >> If i compare firstitme against lalalalfirstitemlalala ... >> then the first row is added to the selected list and so on. ...
    (microsoft.public.access.queries)
  • Re: The like clause of sql
    ... SELECT Tablename.* ... > then we would be saying select all records where firstitem LIKE ... >>> If i compare firstitme against lalalalfirstitemlalala ... >>> then the first row is added to the selected list and so on. ...
    (microsoft.public.access.queries)
  • Re: The like clause of sql
    ... Its not that simple because Tablename.FieldName is a fieldname ... > SELECT Tablename.* ... >> then we would be saying select all records where firstitem LIKE ... >> we want records to be selected if the fieldname matches any part of ...
    (microsoft.public.access.queries)
  • The like clause of sql
    ... I want to compare the values in the table against another value, ...
    (microsoft.public.access.queries)
  • Re: date column
    ... from tableName ... Rgds ... JFB ... i want to compare with 05/30/2005 ...
    (microsoft.public.sqlserver.dts)

Loading