title: Column name or number of supplied values does not match table definition from SQL server
body: <p>I get this error when I try to generate data for my database:</p>
  
  <blockquote>
    <p>Column name or number of supplied values does not match table definition</p>
  </blockquote>
  
  <p>This is the structure of my database:</p>
  
  <pre><code>Create database Newsagents;
  USE Newsagents;
  
  CREATE TABLE Client (
  ClientID int   NOT NULL, 
  Name char(30) NOT NULL,
  City char(20) DEFAULT NULL,
  Type VARCHAR(15) NOT NULL CHECK (type IN('Individual', 'Company'))
  PRIMARY KEY (ClientID)
  ) ;
  
  CREATE TABLE Product (
  ProductNumber char(10) NOT NULL,
  ProductName char(20) NOT NULL,
  Price float NOT NULL,
  isAvailable tinyint NOT NULL,
  PRIMARY KEY (ProductNumber)
  ) ;
  
  CREATE TABLE Sales (
  ID INT NOT NULL ,
  ClientID INT REFERENCES Client(ClientID),
  ProductNumber CHAR(10)  REFERENCES Product(ProductNumber),
  Quantity INT NOT NULL,
  Price FLOAT NOT NULL ,
  Date TIMESTAMP NOT NULL,
  PRIMARY KEY ( ID ) 
  );
  
  ALTER TABLE sales ADD CONSTRAINT d CHECK (Date &gt; CURRENT_TIMESTAMP);
  ALTER TABLE sales ADD CONSTRAINT i CHECK (Quantity &gt; 0);
  </code></pre>
  
  <p>I than fill my database with some values for Client and Product and I want to generate Sales (using values from Client and Product). This is how I do it:</p>
  
  <pre><code>DECLARE @counter INT
  DECLARE @quantity int
  DECLARE @prodNum varchar(20)
  SET @counter = 0 
  WHILE @counter &lt; 10  
  BEGIN
  SET @quantity = (select FLOOR(RAND()*100))
  SET @prodNum = (select TOP 1 ProductNumber from Product Order by NEWID())
  insert into Sales values(
     (select TOP 1 ClientID from Client Order by NEWID()),
     (select @prodNum),
     (select @quantity),
     ((select @quantity)*(select TOP 1 Price from Product where ProductNumber = @prodNum)),
    DEFAULT
    )
   SET @counter = @counter + 1 
   END 
  </code></pre>
  
  <p>However I get the Column name or number of supplied values does not match table definition. 
  What am I doing wrong?</p>