as opposed to using like. I am currently using LIKE in the where clause, but I was asked to accept the user input and search where "part number begins with the user input" as opposed to searching for the string anywhere in the field.
For example, If the user enters "08" I should only return parts beginning with 08.
I am using ASP with SQL Server 7. I suppose that I could do something like take the length of the input string (x), make the query return results where the substr(part_num,1,x) = user_input. Would this work, and is there an easier way that I am not aware of? like part_num BEGINS WITH user_input??
Thanks,
gordon
For example, If the user enters "08" I should only return parts beginning with 08.
I am using ASP with SQL Server 7. I suppose that I could do something like take the length of the input string (x), make the query return results where the substr(part_num,1,x) = user_input. Would this work, and is there an easier way that I am not aware of? like part_num BEGINS WITH user_input??
Thanks,
gordon