Link to home
Create AccountLog in
Avatar of Lulu0
Lulu0Flag for United States of America

asked on

Append string value to table name

How do I get the value from "purchasing" table (assume that value is 1001) and make a new table called "sales" having that retrieved value after it, such as "sales1001"?

I've started....
sql = "SELECT max(transaction_id) as maxT INTO temp FROM purchasing; "
db.Execute sql
DoEvents

...and to make the new table...
sql2 = "SELECT cust_id, prod_id, qty INTO sales  <--how do I append the value 1001 here?
from cust_inv
db.Execute sql2
DoEvents
SOLUTION
Avatar of GlobaLevel
GlobaLevel
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.