Inserting data in specific Sybase columns |
|
At the end of each command press the space-bar or press enter before continuing the next step.
insert into
(
)
to close the group.
values
(
)
go
If everything goes well, you see
(1 row affected)
then the database prompt (a period, the name of the database you
are using, another period, the number one and then the greater
than symbol).
If you see
Msg 102, Level 15, State 1
Server '', Line 1
Incorrect syntax near '89'.
you could have done a lot of things wrong. You could have
entered data that is not the correct type for a column (text in
an integer field for example). You could have used more values
than you have columns. You could have used fewer values than
columns. You could have forgotten the commas. Take a close look
at your insert statement and compare it to your table structure.
When you figure out what went wrong, try it again. This type of
error, which I think is the most likely error to be made, has the
least helpful error code in the entire program.
If you type the data in the wrong order (for instance, putting a name in a city column) Sybase will not give you an error, but you will be surprised when you look at the data later because everything will be wrong. Be very careful. This is a very common human error that can be very difficult to avoid. When you have entered data, double-check it by searching the database for your entries. If you can't find the entry you are searching for, or there is incorrect data, you can correct it. If you don't do this, your searches will return incorrect data.