For loop in sql serever
Hi Friend
pelase check the how to loop the and insert data into db using the for loop in sql server (For multiple values )
DECLARE @CNT INT
DECLARE @Q NVARCHAR(1000)
SET @CNT = 110001
WHILE(@CNT <= 113500)
BEGIN
SET @Q = 'insert into plate_numbers values('+ CAST (@CNT AS NVARCHAR) + ')'
-- PRINT @Q
EXEC sp_executesql @Q
SET @CNT = @CNT + 1
END
Regards,
Bhaskar
pelase check the how to loop the and insert data into db using the for loop in sql server (For multiple values )
DECLARE @CNT INT
DECLARE @Q NVARCHAR(1000)
SET @CNT = 110001
WHILE(@CNT <= 113500)
BEGIN
SET @Q = 'insert into plate_numbers values('+ CAST (@CNT AS NVARCHAR) + ')'
-- PRINT @Q
EXEC sp_executesql @Q
SET @CNT = @CNT + 1
END
Regards,
Bhaskar
Labels: for loop, while loop in sql server
7 Comments:
Hi Uday.. I was going through your hydcarpool website and found it interesting. I have a requirement and would like to know if you could help me with that. You can contact me on 9392166006 or mail me at srikanth.v5guys@gmail.com
By Samrat chakravarthy, At December 8, 2011 at 9:02 PM
Great article, its very useful
We can submit our .net related article links on http://www.dotnettechy.com to get more traffics.
By micle, At December 28, 2011 at 10:49 PM
Hello
Great information about loop in sql server and I think this information will be helpful for me about loop.
James williams
error 1310
By sartaj faisal, At January 11, 2012 at 6:27 AM
Hello
Great information in this post and I think this information in this post will be helpful for me.
Jimmy Alex
Uniblue
By Jimmy Alex, At January 12, 2012 at 5:26 AM
THANKS FOR SHARING THIS POST.
affordable web design
By taylorlautner1984, At January 23, 2012 at 2:36 AM
Hi...
Nice post and really it contain a lot of information which help me in future prospects.
ALEX Roads
error1316 win 7
Thanks for sharing this useful information.
By ALEX Roads, At February 20, 2012 at 5:41 AM
I get a lot of information from this post and also bookmarked this.
ANGELA White,
speed up my pc 2012
Thanks for sharing
By ANGELA White, At March 1, 2012 at 3:01 AM
Post a Comment
Subscribe to Post Comments [Atom]
<< Home