Solved

Insert statment too many values error when inserting comma delimited string.

Posted on 2013-05-20
4
399 Views
Last Modified: 2013-06-07
When I try running the following insert statements, I encounter too many values error
Is it because of the comma delimited string?
If so, what syntax do I use to make this one string?

insert into g_values
  (g_value_id,
   name,
   data_type,
   value,
   description,
   min_value,
   max_value,
   allow_local,
   allow_user,
   synchronize)
values
  ('A1',
   'DATA_FLAG',
   'STRING',
   'MAC','PC','EDSON','LOGITECH',
   'List of itmess.',
   '1',
   '255',
   'N',
   'N',
   'N'
   )
0
Comment
Question by:cookiejar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 39182428
The following is equivalent to 4 values:
'MAC','PC','EDSON','LOGITECH',

Open in new window

0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 39182429
If all of this: 'MAC','PC','EDSON','LOGITECH'  goes into one field, then it needs to be a single string:

'''MAC'',''PC'',''EDSON'',''LOGITECH''',
0
 
LVL 41

Expert Comment

by:Sharath
ID: 39182439
try this
insert into g_values
  (g_value_id,
   name,
   data_type,
   value,
   description,
   min_value,
   max_value,
   allow_local,
   allow_user,
   synchronize)
values
  ('A1',
   'DATA_FLAG',
   'STRING',
   'MAC,PC,EDSON,LOGITECH',
   'List of itmess.',
   '1',
   '255',
   'N',
   'N',
   'N'
   )

Open in new window

0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 39182441
I should also point out that those are all individual single quotes.  No double quotes used.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question