dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: SQL Server Problem

  1. #1
    Join Date
    Jan 2005
    Location
    UK
    Posts
    381

    SQL Server Problem

    Hi There,

    Could anyone tell me why this doesn't work in sql server?

    INSERT INTO courses (applicationid, ccoursename) VALUES (2973,'328'), (2973,'330'), (2973,'332'), (2973,'227');

    Thankyou

  2. #2
    Join Date
    Sep 2004
    Location
    Northeast, FL
    Posts
    332
    There may be a better way, but try this instead:

    INSERT INTO courses (applicationid, ccoursename) SELECT 2973,'328';
    INSERT INTO courses (applicationid, ccoursename) SELECT 2973,'330';
    INSERT INTO courses (applicationid, ccoursename) SELECT 2973,'332';
    INSERT INTO courses (applicationid, ccoursename) SELECT 2973,'227';

  3. #3
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    Quote Originally Posted by mattastic
    Hi There,

    Could anyone tell me why this doesn't work in sql server?

    INSERT INTO courses (applicationid, ccoursename) VALUES (2973,'328'), (2973,'330'), (2973,'332'), (2973,'227');

    Thankyou
    Looks fine. Are you getting an error back?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles