Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    Maryland
    Posts
    152

    Unanswered: Inserting Null values

    Hi,

    I am trying to insert null values into sql server from my access from. I am using sql statement. But it says 'Syntex error in Insert statement'. When i remove null values it works fine? How can I insert null values into a table?

    Any help will be highly appreciated.
    mr_roomi

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    It would help if you post the statement....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Jul 2002
    Location
    Village, MD
    Posts
    621
    Use SQL Pass-Through Query:

    INSERT INTO Table1 ( id, name ) values(13, null);

  4. #4
    Join Date
    Apr 2004
    Location
    LA, CA
    Posts
    125
    If your table accepts null in the field (name) then you don't need to mention that in your isert statment. Just use:

    INSERT INTO Table1 (id) values(13);

Posting Permissions

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