Results 1 to 2 of 2

Thread: Create SQL

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2001
    Location
    UK
    Posts
    271

    Create SQL

    Hi,

    I'm trying to archive my records from one table into another.

    This is the SQL I am using:

    CreateCommand.CommandText = _
    "CREATE TABLE " & "tbl_Arch_Bids_" & Day(Now) & "/" & Month(Now) & "/" & Year(Now) & " SELECT * FROM tbl_Bids"


    this creates a table named:

    tbl_Bids_Arch_(Day)/(Month)/(YEAR)


    but this just seems to error?

    I want to copy the records from (not move) tbl_Bids to the newly created table?...

    What is wrong with my statement?

    Thanks
    §tudz

    Studzworld.com - Portfolio

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    How about using SELECT INTO?

Posting Permissions

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



Click Here to Expand Forum to Full Width