SQL in VBA question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sc5502
    New Member
    • Jun 2014
    • 102

    SQL in VBA question

    MS Access 2010 (with VBA)
    SQL Server 2008


    I have a program that writes the below record to a SQL table.

    Field
    Name Type Example
    _______________ _______________ _______________ ___
    Part_ID int 1
    Key varchar(15) jdoe07/07/2014hrxx2412765 FRXX
    Status varchar(7) Open
    Date varchar(10) 07/07/2014
    Buyer varchar(50) jdoe
    PartNumber varchar(50) hrxx2412765FRXX
    Description varchar(50) collar fitting
    Supplier varchar(50) Acme Fitting
    .
    .
    .
    12 other fields all varchar

    This record is written to the table with a Insert Into.

    Now I need to take the record above add these fields to it and add it into another table.

    md_DateTime varchar(16) 07/07/2014130500
    md_Who varchar(50) msmith
    md_activity varchar(6) Add
    md_Image varchar(1) B

    I can add this record with a Insert Into SQL statement, but
    not knowing SQL Server that well wanted to see if there is another way to do this. Any ideas will be appreciated.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Using insert into is fine.

    Comment

    Working...