From: atledreier on 23 Apr 2010 08:20 I have a database, and some data in that needs to be imported into another database through Excel. I have no control over this, that's the way it needs to be. These Excel files have certain columns, and not all of them relevant for my database. Can I make a query with the relevant fields from my database, and have the needed columns inserted where appropriate? Also, some of my relevant fields have different names than the Excel template. Can I change the column headings in my query to match the Excel template?
From: John Spencer on 23 Apr 2010 09:42 For example if you have to export and leave columns 2 and 3 blank and rename Field2 with a different name. The SQL would look like this: SELECT Field1, Null as Column2, Null as Column3, Field2 as Column4Name FROM SomeTable In query design view, insert new columns in the appropriate place and then enter Field: Field1 Field: Column2: Null Field: Column3: Null Field: Column4Name: Field2 Horizontally that would look like (.|. represents the break between field cells). Field1 .|. Column2: Null .|. Column3: Null .|. Column4Name: Field2 John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County atledreier wrote: > I have a database, and some data in that needs to be imported into > another database through Excel. I have no control over this, that's > the way it needs to be. These Excel files have certain columns, and > not all of them relevant for my database. > > Can I make a query with the relevant fields from my database, and have > the needed columns inserted where appropriate? > Also, some of my relevant fields have different names than the Excel > template. Can I change the column headings in my query to match the > Excel template?
|
Pages: 1 Prev: OpenDiagBox Next: show criteria data from a query on a report using that query |