www.webdeveloper.com
Results 1 to 4 of 4

Thread: Is this possible?

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    24

    Is this possible?

    i want to have a sql statement which moves a record from one table to another, is this possible?
    thankyou.

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    INSERT INTO the_new_table(column_list) SELECT column_list FROM your_other_table;
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

  3. #3
    Join Date
    Mar 2006
    Posts
    24
    thank's for replying, this si the line i have put in

    strSQL = "INSERT INTO savedmail (mailID, recID, content) SELECT (mailID, recID, content) FROM internalmail WHERE mailID =" & mailID & ""


    and i am getting the error

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC Microsoft Access Driver] Syntax error (comma) in query expression '(mailID, recID, content)'.

    /year4/MMT4-155/move2.asp, line 23

    line 23 is execute the sql,

    any one know where its going wrong,


    thankyou.

  4. #4
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    that's not a well formed SELECT statement. there shouldn't be paranthesis around the column list.
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

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