• j2cagle (5/9/2013)


    I'm wanting to send a string into a stored procedure, but only use the first characters up to the first space.

    For example, if I pass in:

    "ABC DEF GHI"

    I'm only interested in "ABC".

    How would I go about handling that in the SP? Currently, I'm setting up the parameter to be VARCHAR(MAX). However, when I pass in a string like above, I get an error:

    Incorrect syntax near 'DEF'

    Any ideas?

    Are you using double quotes around the string or single quotes? If double quotes, that's the problem. If single quotes are being used, we don't have enough info to really answer your question.