Copy linked table and Paste as Data

J

JTurner

I have a linked table whose primary key data type needs to be text instead of
numeric to create a specific join. I want to create a macro that will:

a) Copy my linked table - table name SURVEY
b) Paste the table in the same db as WEB_SURVEY with "Structure & Data"
c) Change the data type of the primary key from numeric to text

Can someone please help me out? I'm CLUELESS!!!
 
S

Steve Schapel

JTurner,

It is possible to do what you are asking (you would use a
TransferDatabase action in your macro to achieve steps a and b combined,
and a RunSQL action to run a couple of DDL queries using ALTER TABLE
statements).

However, it is probably not necessary to go to these lengths. You can
just make a simple select query based on your Survey table, with a
Format() function to produce the text version of the primary key field,
and then use this query as the basis for your other purpose.
 

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