title: SQL Query Error: Invalid Column Name
body: <p>I am new to SQL and I have this problem, I can't seem to search on google.
  This is my school work so please be patient with my coding.
  Now the problem is i am doing a select query and SQL does not seem to recognize the column I need</p>
  
  <p>here is an attached picture, it just says invalid column but it is clear that the column exist</p>
  
  <p><a href="https://www.dropbox.com/s/2xuaxt2ppfzub12/Capture6.JPG?dl=0" rel="nofollow">Dropbox link to the picture</a></p>
  
  <p>here is the complete code</p>
  
  <pre><code>create database Hairsalon
  
  use Hairsalon   
  
  create table Employee
  (
      Employee_ID int primary key,
      Name varchar(20),
      Birthday date,
      Gender char(1)
  );
  
  create table Inventory
  (
      Inventory_ID int primary key,
      Name varchar(30),
      Stock int   
  )
  
  create table Record
  (
      Transaction_Number int primary key,
      Transaction_Date date,
      Transaction_Time time
  );
  
  alter table Record
      drop column Transaction_Date
  alter table Record
      drop column Transaction_Time
  alter table Record
      add Transaction_DT varchar(30)
  alter table Record
      add Transaction_Description varchar(255)
  
  Create table Inventory_Record
  (
      Transaction_Number int primary key foreign key references Record(Transaction_Number),
      Inventory_ID int foreign key references Inventory(Inventory_ID),
  );
  
  create table Customer_Record
  (
      Transaction_Number int foreign key references Record(Transaction_Number),
      Customer_ID int primary key,
      Service_Description varchar(255),
      Pay money
  );
  
  create table Customer
  (
      Customer_ID int foreign key references Customer_Record(Customer_ID),
      Name varchar(20),
      Payable money,
      Session_DT varchar(20)
  );
  
  create table Employee_Record
  (
      Transaction_Number int primary key foreign key references Record(Transaction_Number),
      Employee_ID int foreign key references Employee(Employee_ID),
      Time_In time,
      Time_Out time,
      Record_Date date,
      Customer_Count int
  );
  
  create table Salon
  (
      Customer_ID  int foreign key references Customer_Record(Customer_ID),
      Employee_ID  int foreign key references Employee(Employee_ID),
      Inventory_ID int foreign key references Inventory(Inventory_ID),
      Transaction_Number int foreign key references Record(Transaction_Number)
  );
  
  alter table Customer
      add Session_DT varchar(20)
  
  alter table Customer
      drop column Customer_ID
  alter table Customer
      add Customer_ID int foreign key references Customer_Record(Customer_ID)
  
  alter table Customer_Record
      add Employee_ID int foreign key references Employee(Employee_ID)
  
  alter table Employee
      add [Type] varchar(15)
  
  alter table Employee
      drop column Birthday
      alter table Employee
      drop column Birthday
  
  alter table Employee_Record
      drop column Time_In
  alter table Employee_Record
      drop column Time_Out
  alter table Employee_Record
      drop column Record_Date
  alter table Employee_Record
      add Time_In varchar(20)
  alter table Employee_Record
      add Time_Out varchar(20)
  alter table Employee_Record
      add Record_Date varchar(20)
  alter table Employee_Record
      drop column Customer_Count
  
  insert into Employee 
  values(1,'Test Employee','M','Cashier','bday')
  insert into Employee 
  values(-1,'Null','N','Null','Null')
  insert into Employee values(1,'test1','M','HairDresser','9/8/2014')
  
  INSERT INTO Record  values(2,'')
  INSERT INTO Customer_Record values(1,1,'asd',123.00,null)
  INSERT INTO Customer values(1,'test1',0,'9/8/2014 8:16 AM')
  
  SELECT * FROM Record
  select * from Customer
  SELECT * FROM Customer_Record
  SELECT * FROM Employee
  
  SELECT DISTINCT Customer.Name as 'Customer Name', Employee.Name as 'Attendee'
  FROM Customer, Customer_Record, Employee_Record, Employee
  WHERE ( Customer_Record.Transaction_Number = Employee_Record.Transaction_Number 
          AND Employee_Record.Employee_ID = Employee.Employee_ID
          AND Customer.Customer_ID = Customer_Record.Customer_ID
          ) OR ( Customer_Record.Transaction_Number = Employee_Record.Transaction_Number 
          AND Customer_Record.Employee_ID = -1
          AND Customer.Customer_ID = Customer_Record.Customer_ID
          )
  
  insert into Employee_Record values(9,1,'10:00','10:99','date')
  
  select * from Record
  select * from Customer
  select * from Employee
  select * from Employee_Record
  select * from Customer_Record
  
  select count(Customer_ID) from Customer
  select count(Transaction_Number) from Record
  
  insert into Customer
  values(1,'test',120,DATEFROMPARTS(32,12,31))
  
  INSERT INTO Customer_Record values(1,1,'Long Haired Customer: ',0, null)
  
  DELETE FROM Customer WHERE Customer_ID = 1
  
  DELETE FROM Customer
  DELETE FROM Customer_Record
  DELETE FROM Record
  
  DELETE FROM Employee
  DELETE FROM Employee_Record
  DELETE FROM Inventory
  DELETE FROM Inventory_Record
  
  commit
  </code></pre>