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
sub-report calculations in Access 2003
PC display unreadable when plugged into the TV?
Recommended Cisco Router for 100Mb Ethernet Handoff from Cogent
Receiving logged-on error in Dynamics CRM 4.0 On-premise
Exchange 2010 email Traffic Reporting
The System Protection Tab is missing in Vista. How can I restore it?
Cannot Open "Room Mailbox" Exchange 2010
username php script - how to point it to an excel list
PERL Export to CSV
How do I reset the name of the "Title" column in Sharepoint after it has been renamed in error.