Stored procedure problem URGENT

  • I'm not positive, but I believe you need to change this:

    c.includeincatalog=-1

    to

    c.includeincatalog='-1'

    Without the single quotes, it will treat the - sign as a subtraction.

    -SQLBill

  • What happens if you run the SELECT portion of the SP manually through Query Analyzer?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • If I run it through the query analizer I get the error saying that " ' " and " '' " columns does not exists, but if I do not use replace function it works fine

     

     


    Kindest Regards,

    Web programmer

  • Either run SET QUOTED_IDENTIFIER OFF and re-create your SP, or change your REPLACE statement to look like this:

    replace(c.coursetitle, char(39), (char(39) + char(39)))

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Wrong use of quotes.

    Here's what you need to fix:

    ... left(c.coursenumber,3)+'.'+right(c.coursenumber,3)+' '+replace(c.coursetitle, ' '' ', ' '''' ') as CourseTitle, ...

    And

    TRUNCATE TABLE tmpCourseNumbers

    is much more effective than

    delete from tmpCourseNumbers

    _____________
    Code for TallyGenerator

Viewing 5 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply