how to write a LIKE statement in sql server 2000 using variable instead some string?
SQL also does the heavy lifting for you if you're doing any sort of pattern searches too. For example, given a column with VARCHAR contents, you could do these sorts of things:
WHERE someColumn LIKE "Green%" (finds all that start with "Green")
WHERE someColumn LIKE "%Green" (finds all that end with "Green")
WHERE someColumn LIKE "%Green%" (finds all with "Green" anywhere within it)
WHERE someColumn LIKE "_Green%" (finds all with "Green" in positions 2-6)
etc. , in the above instead green, i want to use variable, how to write that using sql server 2000 as back end, asp.net with c# as front end
- TheMadProfessorLv 71 decade ago
This might give you some ideas: http://www.aspnet101.com/aspnet101/tutorials.aspx?...