Click here to Skip to main content
15,887,585 members
Home / Discussions / Database
   

Database

 
GeneralRe: error in sql server 2008 Pin
Richard Deeming25-Nov-13 2:19
mveRichard Deeming25-Nov-13 2:19 
AnswerRe: error in sql server 2008 Pin
Richard Deeming25-Nov-13 2:22
mveRichard Deeming25-Nov-13 2:22 
GeneralRe: error in sql server 2008 Pin
Jörgen Andersson25-Nov-13 10:24
professionalJörgen Andersson25-Nov-13 10:24 
AnswerSolved! Pin
jojoba201126-Nov-13 18:53
jojoba201126-Nov-13 18:53 
QuestionDynamic Stored Procedure Pin
Commish1322-Nov-13 13:56
professionalCommish1322-Nov-13 13:56 
AnswerRe: Dynamic Stored Procedure Pin
PIEBALDconsult22-Nov-13 14:15
mvePIEBALDconsult22-Nov-13 14:15 
GeneralRe: Dynamic Stored Procedure Pin
Commish1323-Nov-13 5:07
professionalCommish1323-Nov-13 5:07 
GeneralRe: Dynamic Stored Procedure Pin
jschell23-Nov-13 11:16
jschell23-Nov-13 11:16 
Commish13 wrote:
but, I don't know what to put in blah blah blah.


Construct your statement, manually on a piece of paper, as it would look like if your proc was called and it ran. So for example

select column1 from mytable where name like '%acme%'


Then in the above in your stored proc you want to create that as a string. So you must concatenate the values together. (Following is an EXAMPLE and not what you need specifically.)

set @var = 'select column1 from mytable where name like ''%' +@likeValue + '%''';



The multiple ticks in the above is intentional as it tells the database that you actually want a tick in your string.
GeneralRe: Dynamic Stored Procedure Pin
Commish1323-Nov-13 13:17
professionalCommish1323-Nov-13 13:17 
GeneralRe: Dynamic Stored Procedure Pin
jschell25-Nov-13 7:48
jschell25-Nov-13 7:48 
AnswerRe: Dynamic Stored Procedure Pin
GuyThiebaut24-Nov-13 6:03
professionalGuyThiebaut24-Nov-13 6:03 
AnswerRe: Dynamic Stored Procedure Pin
Dusara Maulik26-Nov-13 18:55
Dusara Maulik26-Nov-13 18:55 
Questionconstraints Pin
Member 1041899722-Nov-13 0:47
Member 1041899722-Nov-13 0:47 
AnswerRe: constraints Pin
Chris Quinn22-Nov-13 2:13
Chris Quinn22-Nov-13 2:13 
AnswerRe: constraints Pin
thatraja22-Nov-13 2:51
professionalthatraja22-Nov-13 2:51 
Generaltriggers Pin
Member 1041899722-Nov-13 0:05
Member 1041899722-Nov-13 0:05 
QuestionRe: triggers Pin
thatraja22-Nov-13 0:08
professionalthatraja22-Nov-13 0:08 
QuestionHow to create linked server MySQL? Pin
Arun Sylvester J21-Nov-13 20:45
Arun Sylvester J21-Nov-13 20:45 
AnswerRe: How to create linked server MySQL? Pin
jschell22-Nov-13 9:50
jschell22-Nov-13 9:50 
QuestionSemicolon delimited lists in SQL Pin
.dan.g.21-Nov-13 13:12
professional.dan.g.21-Nov-13 13:12 
AnswerRe: Semicolon delimited lists in SQL Pin
Mycroft Holmes21-Nov-13 13:38
professionalMycroft Holmes21-Nov-13 13:38 
AnswerRe: Semicolon delimited lists in SQL Pin
PIEBALDconsult21-Nov-13 13:48
mvePIEBALDconsult21-Nov-13 13:48 
AnswerRe: Semicolon delimited lists in SQL Pin
Peter Leow21-Nov-13 13:58
professionalPeter Leow21-Nov-13 13:58 
GeneralRe: Semicolon delimited lists in SQL Pin
.dan.g.21-Nov-13 14:13
professional.dan.g.21-Nov-13 14:13 
Questionfind total money of parent node of tree according to a particular pattern Pin
jitendra raj20-Nov-13 5:54
jitendra raj20-Nov-13 5:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.