May 1, 2015 at 9:02 am
I have a problem I'm having trouble solving.
I have an application I write a textbox: 'SQL SQL' MICROSOFT 'SQL SQL'
When I click a button, I wanted to receive as stored procedure parameter:
@ String = 'SQL SQL "OR MICROSOFT OR MICROSOFT OR' SQL SQL '
Can you help me please.
thank you
May 1, 2015 at 9:24 am
diogo_1984 (5/1/2015)
I have a problem I'm having trouble solving.I have an application I write a textbox: 'SQL SQL' MICROSOFT 'SQL SQL'
When I click a button, I wanted to receive as stored procedure parameter:
@ String = 'SQL SQL "OR MICROSOFT OR MICROSOFT OR' SQL SQL '
Can you help me please.
thank you
It is not at all clear what your question is here. If you are using sql parameters you don't need to escape single quotes. Keep in mind that the only thing we know about your project is what you have shared which in your post is pretty much nothing.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
May 1, 2015 at 9:42 am
If someone is sending you a string and you want to use it as a part of a WHERE clause, you'll need to be sure you use dynamic SQL in order for this to work. You'll also need to properly parse and ensure quote pairs are matched.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply