![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hell All, To reproduce one of our cusotmer's probem, I need to make the SQL to run for more than a minutes before it returns the result set. I do not have large amount of data in the database to simulate the dealy. Is there a way in SQL to cause the delay while returning the result set Thanks for the help. Regards Raj |
#3
| |||
| |||
|
|
WAITFOR will do that. select getdate() waitfor delay '00:01:00' select getdate() Roy Harvey Beacon Falls, CT On Wed, 27 Jun 2007 11:16:26 -0700, Raj <jkama... (AT) gmail (DOT) com> wrote: Hell All, To reproduce one of our cusotmer's probem, I need to make the SQL to run for more than a minutes before it returns the result set. I do not have large amount of data in the database to simulate the dealy. Is there a way in SQL to cause the delay while returning the result set Thanks for the help. Regards Raj- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
Thanks for replying. My challange is that I can pass only one SQL statement at at time. Is there a function that I use like this: select a, b, c from table_a a, table_b where a.cid = b.cid and delay(0:0:1) |
#5
| |||
| |||
|
|
Hell All, To reproduce one of our cusotmer's probem, I need to make the SQL to run for more than a minutes before it returns the result set. I do not have large amount of data in the database to simulate the dealy. Is there a way in SQL to cause the delay while returning the result set Thanks for the help. Regards Raj |
#6
| |||
| |||
|
|
Thanks for replying. My challange is that I can pass only one SQL statement at at time. |
|
Is there a function that I use like this: select a, b, c from table_a a, table_b where a.cid = b.cid and delay(0:0:1) |
#7
| |||
| |||
|
|
Raj (jkama... (AT) gmail (DOT) com) writes: Thanks for replying. My challange is that I can pass only one SQL statement at at time. Huh? What environment is this? Is there a function that I use like this: select a, b, c from table_a a, table_b where a.cid = b.cid and delay(0:0:1) You could write one that calls xp_cmdshell and the uses a wait command in the shell. But hopefullly you can also access the database from a regular query window. In such case you can start a transaction that locks one of the tables in your query. After a minute you commit/rollback that transaction, so that the other process is let go. -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
#8
| |||
| |||
|
|
"Raj" <jkama... (AT) gmail (DOT) com> schreef in berichtnews:1182968186.181731.177720 (AT) k29g2000hsd (DOT) googlegroups.com... Hell All, To reproduce one of our cusotmer's probem, I need to make the SQL to run for more than a minutes before it returns the result set. I do not have large amount of data in the database to simulate the dealy. Is there a way in SQL to cause the delay while returning the result set Thanks for the help. Regards Raj maybe you should tell us WHY you need a delay, because most in the eyes of most people a SQL-server must be fast, so no DELAY's.... I hink when you do give that information, there might be another way to solve your problem. regards, Luuk |
#9
| |||
| |||
|
|
Raj (jkama... (AT) gmail (DOT) com) writes: Thanks for replying. My challange is that I can pass only one SQL statement at at time. Huh? What environment is this? Is there a function that I use like this: select a, b, c from table_a a, table_b where a.cid = b.cid and delay(0:0:1) You could write one that calls xp_cmdshell and the uses a wait command in the shell. But hopefullly you can also access the database from a regular query window. In such case you can start a transaction that locks one of the tables in your query. After a minute you commit/rollback that transaction, so that the other process is let go. -- Erland Sommarskog, SQL Server MVP, esq... (AT) sommarskog (DOT) se Books Online for SQL Server 2005 athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books... Books Online for SQL Server 2000 athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |