fyi, square brackets [ ] are only used to surround object names that have either spaces or punctuation marks other than underscore in them, or are a reserved word.
i.e.
[Redrawn?] and not Redrawn?
[Year] and not Year
Main Topics
Browse All Topicsim trying to write an insert query where i insert some values into another table. my table doesent have a field called date entered but i want to make it push over the current date with getdate. just having a syntax problem.
this is what i have so far: can i make it use the date function ?
INSERT INTO TEST_dna_labKits ( KitNum, Disease, Study, ADCID, FamID, IndID, Type, DateDrawn, Yellow, Purple, [Redrawn?], DateEntered, Deleted )
SELECT Samples.KitNum, "AD" AS DISEASE, "LOAD" AS STUDY, Samples.ADCID, Samples.FamID, Samples.IndID, Samples.Type, Samples.DateDrawn, Samples.Yellow, Samples.Purple, Samples.[Redrawn?], [GetDate()] AS DateEntered, "0" AS Deleted
FROM Samples;
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: r_ShealyPosted on 2007-12-14 at 12:56:00ID: 20474396
getdate() should have single quotes around it and not [
use this 'getdate()'
that should work