Results 1 to 3 of 3

Thread: Fresher (Inserting data)

  1. #1
    Join Date
    Jul 2008
    Location
    London
    Posts
    1

    Fresher (Inserting data)

    I'm having problems inserting the following data into my table, what am I doing incorrectly?
    insert into emp_2002(Firstname, Lastname, Title, Age, Salary, Start-date) values('Adam', 'Doyle', 'Analyst', 25, 19500, 25/05/2005)

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    What was the error? What's data type of Start-date? Which rdbms do you use? Tried with this?

    insert into emp_2002(Firstname, Lastname, Title, Age, Salary, Start-date) values('Adam', 'Doyle', 'Analyst', 25, 19500, '25/05/2005')

  3. #3
    Join Date
    Dec 2004
    Posts
    502
    For most rdbms, if you have punctuation or spaces in your column names, you have to put brackets or double quotes around them when you reference them:

    insert into emp_2002(Firstname, Lastname, Title, Age, Salary, [Start-date]) ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •