Date values must be enclosed in quotes for these to be interpreted correctly. Remember / is also the divide operator, so what you are trying to insert into your date value is 18 divided by 7 divided by 2002. Enclosing within single quotes, e.g. '18/7/2002' will fix the problem, however as this date format is subject to regional issues, I always recommend that people use the YYYYMMDD format as this works correctly for all regions, e.g. '20020718'.
For More Information
- Dozens more answers to tough SQL Server questions from Tony Bain are available here.
- The Best Microsoft SQL Server Web Links: tips, tutorials, scripts, and more.
- The Best SQL Web Links
- Have a SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical SQL Server questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Microsoft SQL Server Installation
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.