简体   繁体   中英

Append only records where to columns criteria match

I need to do a query but unsure how to do it - I have searched the internet and the site but to no avail

We receive data in a very unusual format, and we cant request to have it changed either. The data may change columns daily and we have 250 columns of data

I want a query to search the columns and if for example column 3 and 4 have 110 in them, then I want that record to append to a new table

The two columns I need to compare will always be next to each other, but can be anywhere within the 250 columns

Any help here is greatly appreciated.

Regards

In what form do you receive the data - Excel, csv, dbf? You set a link to the source? The column names are always the same? Did you mean append to an existing table? Are the fields all in the same order in the link table and local table design? Consider:

INSERT INTO table2 SELECT * FROM table1 WHERE Field3=110 AND Field4=110

Otherwise, probably need VBA procedure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM