Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1

    Unanswered: UDF/Stored proc paranthesis issue

    Hiya folks, I'm having an issue with a particular query and it's driving me nuts. I have a stored procedure running a query that looks like this:

    Code:
    INSERT INTO someTable(someFields)
    SELECT someStuff
    
    FROM tblRM rm INNER JOIN tblRMDtl rmdtl On rm.rm_id = rmdtl.rm_id
    	INNER JOIN tblEmployee emp ON emp.employee_id = rmdtl.employee_id
    	INNER JOIN tblNotificationType nt ON nt.notification_type_id = dbo.GetNotificationtypeID2(rm.rm_time, GETDATE())
    QA is throwing errors at me telling me there is a syntax error on the last line around ")". I can take the entire query and run it on it's own with no errors at all. I have a hunch this has something to do with user defined functions not playing nice with stored procedures. however, just for the hell of it, I created a test proc to make sure I could return a value from my udf and was successful.

    What am I doing wrong here? Can I simply not use a udf as part of a join in a stored proc?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    nevermind... i guess.


    I copied the exact same query into a new stored procedure and it compiled just fine. Must of had some kind of garbage character in the last one. Bizarre...
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •