How to add a column to a table using code or execute a scripit using code?

S

Steve Schapel

RC,

You can run an SQL statement using
ALTER TABLE ADD COLUMN...
Check this topic in Help, and post back if you need more specifics.
 
R

RC

Thanks! I am trying to work on it.
I also wanr to know about how can I execute a script using
code.
Thanks again.
 
S

Steve Schapel

RC,

It depends on where and when you want the code to execute. Can you give
a bit more information, maybe with examples, of what you are trying to
achieve? Thanks.
 
R

RC

I am sorry that my question was not clear.
I have a script "abc.vbs" on hand which used to combine
several .csv files (say a.csv, b,csv...)into one and add a
column to indicate the rows of data is form which file
(a.csv,b.csv...).

And now I am trying to do the same thing in Access, so I
asked how to add a column to a table. However, I found
problem in trying to identify the rows of data. So, I
wonder if I can run the script "abc.csv" to simply solve
my problem.

Thanks.
 
S

Steve Schapel

Ok, thanks for the further explanation. If I understand you correctly,
you should be able to use an Update Query or an Append Query (or both)
to get the imported data into the desired place, along with an
appropriate entry in the new field to indicate its originating csv file.
It sounds like you would be best to initially import the data from
each csv file into separate Access tables, and then process them from
there into the one core table.
 
R

RC

O..it will be a great solution. Thank you for guiding me.
But for my knowledge, I want to know if it is possible to
run a script, say "ABC.vbs", using Access code?
Thank you very much.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top