Thread: SQL in VBA

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    1
    Rep Power
    0

    SQL in VBA


    I am using a select into statement that creates a new table. I would like to make it so that I can run a loop that creates similar new tables. Each time a SELECT INTO statement is used, I would like for the older table to be overriden by the new table, but I keep getting the error that the original table already exists. Does anyone have any suggestions on how to do this? I am programming in VBA and therefore cannot use try catch blocks
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,424
    Rep Power
    4539
    You'll have to add a DROP TABLE before you try to recreate a new table with SELECT INTO
    ======
    Doug G
    ======
    The man who doesn't read good books has no advantage over the man who can't read them.
    --Mark Twain
  4. #3
  5. No Profile Picture
    Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    14
    Rep Power
    0
    You need to give a LOWER DINING ROOM TABLE prior to deciding to try to create a brand new desk using PICK OUT INTO.

    Comments on this post

    • medialint disagrees : Dude, when OP said "TABLES" he was referring to DATABASE tables not DINING ROOM TABLES ... wtf!?

IMN logo majestic logo threadwatch logo seochat tools logo