Microsoft
Software
Hardware
Network
Question : Insert Into
i have got a table that I created: DEPARTMENTS
This table has: DepartmentID, DepartmentName, ManagerID and LocationID
I am trying to instert 3 additional departments; Sales, Shipping and Accounts.
Insert Into Departments
(DepartmentName)
Values ('Sales', 'Shipping', 'Accounts')
After I Execute I get:
Msg 110, Level 15, State 1, Line 1
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
Answer : Insert Into
Insert Into Departments (DepartmentName)
SELECT 'Sales'
UNION ALL SELECT 'Shipping'
UNION ALL SELECT 'Accounts'
Assuming the other fields allow null
Random Solutions
Under IE8, my website looks different when I view it at sitename vs sitename.domain.com
Executing a command after a SQL 2005 Maintenance Plan
Sharepoint Employee Tracker
UIImage app - Placing an Image at x,y
Pop-up windows interrupting my browser even after thorough scans.
Allow OWA access for Internal Users through ISA 2006 Server
ASP.NET Eval statement
How to find max/min integers in a vector?
SQL 2008 does not send email
V-lookup