Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Inserting Data - Resolved

Author  Topic 

artizan
Starting Member

5 Posts

Posted - 2014-11-29 : 06:43:14
Hi,

I am new to SQL but have managed to create a table with five columns. The problem I am having is when I try and run the INSERT command I get an error "Maximum characters exceeded in SQL statement"

My table code is: create table myemployees_MPA0510
(FirstName Varchar (15), LastName
varchar (20), Title varchar (25),
Age number (3), salary number (9));


and my INSERT code is: Insert into myemployees_MPA0510
(First, Last, Title, Age, Salary)
Values ('Jonie', 'Weber', 'Secretary', 28, 19500.00) ('Potsy', 'Webber', 'Programmer', 32,

45300.00) ('Dirk', 'Smith', 'Programmer II', 45 75020.00) ('Mark', 'Aldridge' 'Technical', 52,

12000.00) ('Peter', 'Wright' 'Admin' 30, 11000.00) ('Lucy', 'May', 'Technical', 15500.00)

('Robert', 'Hurst', 'Finance', 54, 16000.00) ('Ann', 'Green', 'HR', 43, 21000.00);

Not sure where I'm going wrong??

Grateful for any help you can offer.

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2014-11-29 : 11:35:08
put a comma between ) ( like this ), (

each parenthesis-delimited set is one row. you need a comma between rows
Go to Top of Page

artizan
Starting Member

5 Posts

Posted - 2014-11-29 : 13:19:20
gbritton, Many thanks for your help.
Go to Top of Page
   

- Advertisement -