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
Deleting OEM Jobs
Dell Disk error - is there any point trying to recover this? Whats the problem do you think?
Turn XML into RSS feed
Newtons Method Applied to Annuities
How can I get an extended desktop in this setup?
Youube / video stopped working on Mac Leopard
can a windows 2003 domain controller and a windows 2008 domain controller coexist ?
How to sum a formula involving a nested if statement in Crystal 2008
SDK for linux
How to get asp.net page to execute code on page close