How to add empty columns to tble using query? (1 Viewer)

davidg47

Registered User.
Local time
Today, 05:05
Joined
Jan 6, 2003
Messages
59
I have a text file that I will be importing into a new table once a week (every week) that I will need to add about 30 more columns to before I export it to a new text file in preparation for importing it into another Access application.

Is there a way through a query to add the columns without having to open the table and manually add them each week?

Thanks,
David
 

KenHigg

Registered User
Local time
Today, 05:05
Joined
Jun 9, 2004
Messages
13,327
I'm guessing you shouldn't be creating new columns in your table. You should be adding rows that have a column that ties each row to a import occurance.

:):)
 

davidg47

Registered User.
Local time
Today, 05:05
Joined
Jan 6, 2003
Messages
59
I import one text file that is evenly spaced with maybe 25 fields. I need to add another 20 or so columns to get this file to match up with an import routine I have written. This company sends me 3 different data feeds in text format. One of them has 45 columns, the other has maybe 30 columns, and then this one with about 25 columns. I want to increase the two smaller ones so the same import routine will work for all of them.
 

KenHigg

Registered User
Local time
Today, 05:05
Joined
Jun 9, 2004
Messages
13,327
Fields and columns aren't really a good place to start when coming up with a table model. You should be looking at what the each pc of data represents in the real world. Can you share an overview of what the 45 flds in the largest file represent?
 

KeithG

AWF VIP
Local time
Today, 02:05
Joined
Mar 23, 2006
Messages
2,592
In the query design grid click in the column name field and type BlankField: Null as the field name. This will create a column call BlankField and all the rows will have a null value for this field.
 

Users who are viewing this thread

Top Bottom