Click to See Complete Forum and Search --> : My eyes must be missing something
calliepeck
04-26-2006, 03:48 PM
Where's my syntax error?
INSERT INTO survey_leg (id, resno, date_added, member, kind, text) VALUES (1, 'H.R. 459', #4/15/2006#, 'Lantos', 'Introduced', 'Text of the Resolution')
id is a number
resno, member, kind are text
date_added is a date
text is memo
(Working in Access...have also tried removing # from dates)
Cheers
NogDog
04-26-2006, 03:52 PM
What DBMS are you using? In MySQL (and I think in Oracle, too) you would quote the date (instead of the # characters). Also, "text" might be a reserved word, in which case you may to to back-tick it when using it as a column name: `text`.
calliepeck
04-26-2006, 04:08 PM
Ah ha, it was the text.
Ok, one more question while we're at it. I am getting this error:
The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
I've removed primary key status from my ID field, which is the problem child. I also changed the index around to not index and then to index and allow duplicates. No dice. This is meant to be a one to many relationship in my datastructure, but I'm getting nowhere.
calliepeck
04-26-2006, 04:09 PM
:o Umm, nevermind, i had them all as one to one. Oops