Pls find out mistake in this prog. BEGIN DECLARE @abc TABLE(a int,b int) DECLARE @vWhere varchar(200),@vSQl varchar(100) set @vWhere=' Where a=7701' insert...
the last statment exec sp_sqlexec @vSQL causes error. why? becuase the scope of table varibale @abc doesn't exists when you pass @vsql to sp_execsql. you can...
HCL Comnet IS HIRING IT PROFESSIONALS FOR NOIDA / CHENNAI LOCATIONS HCL Comnet is hiring the following professionals. .. for Chennai / Noida Locations 1 Unix...
Sunil, Your procedure is unlikely to create problems like deadlock. But it seems that the procedure may produce incorrect results since the possibility of more...
It is not recommended to begin the stored procedure name with 'sp_'. When you execute a procedure starting with sp_, it will search the master database first...
Hi, 1. You can consider using TOP clause instead of SET ROWCOUNT 2. In your UPDATE clause you can use JOIN instead of IN(). 3. *Consider* using table variable...
Babu, See my comments inline. ... You cannot use a variable with Top in SQL server 2000 without comverting the entire script to dynamic SQL. ... I'd recommend...
Very valid point. Regards Roji. P. Thomas http://toponewithties.blogspot.com ... From: Babu PP To: sqlcon@yahoogroups.com Sent: Tuesday, October 03, 2006 11:51...
Hi Roji, Thanks for your comments. I have my justifications below, for each point. Still comments are welcome (from all of you). 1. I have tested this in 2005...
Dear roji and babu, thanks for ur help. but i have some questions ... if i am using top clause we have to use dynamic sql which is more expensive ?? am i...
Babu, 1. TOP @var is an enhancement made in SQL server 2005. In 2000 it was not possible. See http://toponewithties.blogspot.com/2005/07/top-enhancements.html ...
... if i am using top clause we have to use dynamic sql which is more expensive ?? am i right ? ( also heard that dynamic sql can get sql injection threat) ...
Sunil, One way of solving the issue is putting the SELECT and UPDATE inside a single transaction and specifying the WITH(UPDLOCK) hint on the table when you...
Babu, I have to interfere because some of your advice is not technically correct here. 1. JOIN is faster than IN() Its not correct. First of all, they serve...
I totalay agree with Roji, We performed a series of tests last summer in our company from dataset varyting fom 10 rows to 1 lakh rows and agianst a big data...
Dear Roji and Babu, As per your suggestion i have modified the code: please have a look and let me know everything is fine. (waiting for ur reply) Changed the...
Dear Roji, So i hope everything is fine. Here we are using actual table,but which has existence only within transaction. Am i right? Do i need to drop this...
Sunil, If you are using a permanent table, you have to truncate the table before performing the insert. I think its better to use a temprary table or table...
Hi All, Aneesh Retnakaran(aneeshattingal@...) from SQLCON has been MVP'd in SQLServer Refer: http://www.microsoft.com/india/mvp/indiamvp.aspx. Great...
Hi Sunil, when u want to optimise a query, first and foremost thing u do is to limit the IO(input/output operation) on the hard disk, since HDD is the slowest...
Congrats Aneesh. Keep up the good work Regards Roji. P. Thomas http://toponewithties.blogspot.com ... From: Madhu K Nair To: sqlcon@yahoogroups.com Sent:...
Hi Madhu, It was typing mistake, thanks for pointing that. but u said ... Apart from that it will also create problem when multiple users are concurrently...