5 Replies Latest reply: May 4, 2012 8:21 AM by djkhalif RSS

    Queries not working in CF......

    djkhalif Community Member

      Good morning all,

       

       

      I have this query that I can run in SQL Server Management Studio but it will not run in ColdFusion. Do I need to put in a stored procedure to run the below code?

       

      <cffunction name="itmChk" returntype="query">

          <cfargument name="searchPO" required="yes">

          <cfquery name="itemCheck" datasource="#REQUEST.datasource#">

          select ordno, itnbr, house, poisq, blcod, b_blksq, cmpdt, itdsc, engno, itcls, duedt, umord, qtyor, stkqt, staic, vndnr, vname, b_relqt, b_reldt, b_stkqt, b_staic, pitd1, pitd2, duedate

              from recvTemp t

              where t.ordno = '#arguments.searchPO#'  and not exists(select *

                                               from recvLogTest r

                                               where t.ordno = r.ordno and t.itnbr = r.itnbr)

          </cfquery>

          <cfreturn itemCheck>

          </cffunction>

       

      Thanks for any help!!!

       

      DJkhalif