DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: EXEC statements

Hybrid View

  1. #1
    Kristin Guest

    EXEC statements


    I have some code that is not executing properly and I think it's because of
    the large number of EXEC('Update....') statements I have in the proc. The
    proc is basically structured with 4 straight updates at the beginning followed
    by probably 32 or so EXEC('Update...') statements -- finished off by a straight
    update. I'm thinking about breaking the EXEC statements off into it's own
    proc to clean up the problem. Has anyone else seen this problem with procs
    using a large number of EXEC statments. I'm using the EXEC statements to
    build the SQL on the fly.

    Thanks,
    Kristin Piskulic

  2. #2
    Francisco Guest

    Re: EXEC statements


    What do you mean by not executing properly ?

    bear in mind that if you are executing stored procs (sp_), sql server much
    check to see if it exist.


    also, statement inside '' are not compiled until the exec statement is execucuted


    Francisco


    "Kristin" <kpiskulic@microcon.com> wrote:
    >
    >I have some code that is not executing properly and I think it's because

    of
    >the large number of EXEC('Update....') statements I have in the proc. The
    >proc is basically structured with 4 straight updates at the beginning followed
    >by probably 32 or so EXEC('Update...') statements -- finished off by a straight
    >update. I'm thinking about breaking the EXEC statements off into it's own
    >proc to clean up the problem. Has anyone else seen this problem with procs
    >using a large number of EXEC statments. I'm using the EXEC statements to
    >build the SQL on the fly.
    >
    >Thanks,
    >Kristin Piskulic



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center