Link to home
Start Free TrialLog in
Avatar of cookiejar
cookiejarFlag for United States of America

asked on

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

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'
   )
Avatar of MikeOM_DBA
MikeOM_DBA
Flag of United States of America image

The following is equivalent to 4 values:
'MAC','PC','EDSON','LOGITECH',

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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

Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I should also point out that those are all individual single quotes.  No double quotes used.