append table onto table

  • Thread starter Thread starter mj
  • Start date Start date
M

mj

Hi. I have a table, tblShipLBD, that I'd like to have
programatically appended everyday to tblShipped. I have a
mechanism setup to execute the event but I'm not sure what
code to use. They have the same fields. Is it INSERT INTO?
Please let me know if there are any suggestions out there.
Thanks!
 
Use the query/type/append wizard and you will come up with the SQL whcih you
can plug into your mechanizm.
 
Thanks for the tip. I can up with some SQL code that looks
like below but I'm getting a compile error. I'm guessing
my syntax is wrong and I need some quotation marks. Any
additional suggestions would be great. Thanks!

INSERT INTO tblShipped ( INVOICE_DA, PO__, CUSTOMER__,
QUANTITY, SALES__, EXTENDED_N, REBATE_ACC, PRODUCT_HI,
PRODUCT_H2, PRODUCT_H3, PRODUCT_H4, PRODUCT_H5,
MATERIAL_N, MATERIAL__, PACKAGE_QU ) _
& SELECT tblShippedLBD.INVOICE_DA,
tblShippedLBD.PO__, tblShippedLBD.CUSTOMER__,
tblShippedLBD.QUANTITY, tblShippedLBD.SALES__,
tblShippedLBD.EXTENDED_N, tblShippedLBD.REBATE_ACC,
tblShippedLBD.PRODUCT_HI, tblShippedLBD.PRODUCT_H2,
tblShippedLBD.PRODUCT_H3, tblShippedLBD.PRODUCT_H4,
tblShippedLBD.PRODUCT_H5, tblShippedLBD.MATERIAL_N,
tblShippedLBD.MATERIAL__, tblShippedLBD.PACKAGE_QU _
& FROM tblShippedLBD;
 
Mj,
you probably figure it out by now. How do you run the SQL, you definitely
need some quote marks there.
 
Back
Top