Showing results based on first charcters of a fiel

Results 1 to 3 of 3

Thread: Showing results based on first charcters of a fiel

  1. #1
    Join Date
    Dec 1969
    Posts
    778

    Default Showing results based on first charcters of a fiel

    I am constructing a search page where the user can specify a partial or whole part number and get back results. I want the user to choose if the data they provide is equal to the "starting" characters of the part number, or if the data they provide is "contained" anywhere within the part number - for the "contains" option I used "LIKE" in the SQL - WHAT COULD I USE FOR THE "STARTS WITH" OPTION?<BR>Thanks for any help! :-)

  2. #2
    Join Date
    Dec 1969
    Posts
    100

    Default RE: Showing results based on first charcters of a

    You can construct a SQL the in this way...<BR>If it is the Starts option write,<BR>select * from table where "&searchString&" like &#039"&searchText&"%&#039<BR>and if the data they provide is "contained" then use<BR>select * from table where "&searchString&" like &#039%"&searchText&"%&#039<BR><BR>Hope this may help you<BR>(:-Vikki<BR>

  3. #3
    Join Date
    Dec 1969
    Posts
    778

    Default RE: Showing results based on first charcters of a

    WORKED GREAT!<BR>THANK YOU!<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •