Results 1 to 3 of 3

Thread: make tables in sql

  1. #1
    Guest
    okay, i figured it out..

    i assign the name and time to a variable..

    dim thyme as string
    thyme = "NewTable_" & Format(Now(),"hhnnssAMPM")

    this works:
    strSQL = "SELECT * INTO " & thyme & _ etc...etc..


    thankx for your replys,




    i would like to add the time this table was
    created by appending it to the name of the
    newly created table, eg: NewTable083354PM

    i have tried to concenate a format(now(),"hhnnss")
    to the [NewTable] part with no success.

    is this even possible?


    strSQL = "SELECT * INTO [NewTable] " & _
    "FROM MyTable " & _
    "WHERE MyTable.Process_Time = " & Me.Text1(1)
    db.Execute strSQL, dbFailOnError


    tried this with no luck:

    thyme = Format(Now(), "hhnnssAMPM")
    //gets the correct time but doesn't append it to table name

    strSQL = "SELECT * INTO [NewTable]" & thyme & _ etc..etc..

    [Edited by larryn on 06-05-2000 at 01:07 PM]

  2. #2
    New Member
    Join Date
    Oct 1999
    Posts
    14
    I think that if you try this it will work

    str1 = Format(Now, "hh") & Format(Now, "mm") _
    & Format(Now, "ss")

  3. #3
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    Your problem might be with the right bracket(]). I would try this:

    strSQL = "SELECT * INTO [NewTable" & _
    Format(Now(), "hhnnssAMPM") & _
    "] FROM MyTable " & _
    "WHERE MyTable.Process_Time = " & Me.Text1(1)

    "It's cold gin time again ..."

    Check out my website here.

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