Re: Add bulk info

From: Partha Mandayam (mcp111_at_hotmail.com)
Date: 08/25/04


Date: Wed, 25 Aug 2004 10:52:37 -0700

call this stored procedure from your asp page

create proc fill_numbers
(
@start_num int,
@end_num int
)
as

declare @num int

create table #tbl
( number int, dateentered datetime
)
set @num=@start_num

while @num <= @end_num
        begin
        insert #tbl select @num, getdate()
        set @num=@num+1
        end

select * from #tbl

go

Regards

Partha Mandayam
Software Consultant
Home page: http://partha.tripod.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: itinerating for insert into (rownumber, fetchstatus)
    ... tbl --does not help? ... declare @i int ... So, anyone can tell me a best aproach, or the above one is a ...
    (microsoft.public.sqlserver.programming)
  • Re: resultset of proc in another proc
    ... i want to use the result set from a stored proc in another stored proc, ... declare @tbl (y1 int, y2 int) ...
    (comp.databases.ms-sqlserver)
  • Re: Trigger: IF / ELSE
    ... Elmar Boye schrieb: ... declare @id_Agreement int ... insert into tbl values ...
    (microsoft.public.de.sqlserver)
  • Re: Triggers und History
    ... and SO.= @tbl ... So wirst Du bei dieser Tabelle: ... ID PRIMARY KEY NOT CLUSTERED, ... F1 int ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: SQL Injection Code Help
    ... Dan Sullivan wrote: ... DECLARE @n INT ... SELECT TOP* From #tbl ...
    (microsoft.public.sqlserver.security)