/* BA/20091202: RQ507*/
IF NOT EXISTS
(
  SELECT SysColumns.Name 
  FROM SysObjects WITH (NOLOCK) 
    INNER JOIN SysColumns WITH (NOLOCK) ON SysColumns.Id = SysObjects.ID 
    AND SysColumns.Name = 'StaffID'
)
  ALTER TABLE RESERVATIONMAIN ADD StaffID INT

