Home Forums SQL Server 7,2000 Administration Multitasking queries, pausing a query, prioritizing queries RE: Multitasking queries, pausing a query, prioritizing queries

  • With reqrads to the queries themselves the answer is no.

    However you could potentially write Query 1 with a while loop in it and each step thru the while check a flag table which Query 2 could set as marker on which would cause query 1 to stay in the loop (which you could add a "WAIT FOR" in so it is a slow loop), btu have query 1 write a different marker in the table as well to signal back to query 2 all is clear.

    Now query 2 on seeing the marker from 1 set could run then it's process and update the flag to all clear for query 1 to continue.

    Query 1 then in turn sets it's flag to running also and continues until complete.

    Or in query 1 do a cursor or loop which during the process has the code for query 2 in it and montiors whatever would be the trigger for query 2 to need to occurr, and you just continue based on your rules thru the cursor or loop setting those thatmeet query 2 rules to where they need to be and those that don't continue thru query 1.

    But overall this kind of logic probably would be better for a C or VB application which could handle live singnalling unlike queries within sql server.

    Lastly I bet you could even write Query 1 to occurr much faster in the realm of a few mintues and thus be out of the way for 2 but without all the details of you rules and code I cannot be certain that is what you would even want.