You can pass the comparison string in as a parameter in a parameterized
query. If you want a "wild-card search", just append '%' to the end of the
string before you pass it in. Also it's a good idea to *not* pre-pend '%'
to the front of the search string.
Hello. I was wondering if anyone would recommend or point me to a best
practice method in programming a search field on an .asp page that calls a
SQL Server stored procedure to do 'LIKE' searches? The only method that
seems to accommodate this that comes to my mind as of now is using dynamic
sql in the stored procedure but hear that it's not good practice using
dynamic sql.
Re: Problems with Delete Command ... The SQL could get fairly messy if you need to construct it in code, ... ContactID, and WebComID, and create your on-the-fly SQL on that saved query,... to find the list of ContactIDs from the junction table, ... This is a style/readability thing: if you are going to use string... (microsoft.public.access.tablesdbdesign)
Re: Invalid CastException with SqlDBType ... Add(string*, SqlDbType, int, string**) ... The DateTime.Now is trying to cast into a int. ... not in Sql set up the column as identity and let it seed itself. ... > update a MS SQL Database with a stored procedure.... (microsoft.public.dotnet.framework.aspnet)
Re: Need help with Code Please!!! ... posted in response to my last post was some SQL, but this is not the SQL that ... the actual string that gets built at the end of the SQ1 build process. ... The message says Syntax error in query expression... Dim rs As Recordset 'object ref to qryCompany\USFNumber ... (microsoft.public.access.formscoding)
Re: Query question ... > dynamic sql inside of a stored procedure.... > that allow any string as a substitute. ... The query execution plan can be reused. ... (microsoft.public.sqlserver.server)
Re: SQL 2000: Inserting multiple rows into a single table ... and my question is on the order details.... > to set up a stored procedure that essentially inserts in the orders ... I also need to do this via SQL 2000. ... > me a string of data per column for order details, ... (microsoft.public.sqlserver.programming)