Trying to insert some sample rows into a database. I would like to use the 'WHILE' statement (getting a grasp on sql). This is my database:CREATE TABLE personnel (emp CHAR (10),boss CHAR (10),lft INTEGER NOT NULL DEFAULT 0,rgt INTEGER NOT NULL DEFAULT 0);
Here is the code that I am trying to execute:DECLARE @iCounter intSet @iCounter = 1WHILE (@iCounter <> 10) Begin Insert into personnel (emp,rgt,lft) values ('bill_'+Cast( @iCounter as varchar(10) ),1,1) Go Print 'bill' set @iCounter=@iCounter+1 End And I doing something wrong?--------------------http://www.utsa.edu/(Joe) Joseph McBride