Solved

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

Posted on 2013-05-20
4
391 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
  • 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 76

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 40

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 76

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now