0
My system imports every day CSV files from several directories into a table called TB_ARQUIVO. In this file, it contains the name of the Hotel (HOTEL_NOME column) and four types of Channels... SEGMENT, ORIGIN, COMMUNICATION and VEHICLE, outside other columns..
I have other tables where I have previously registered the information I use to score customers. That is, I have the Tb_hotel with all hotels registered that are compared with the file imported in the HOTEL_NOME column. As I have the following tables TB_SEGMENTO, TB_COMUNICACAO, TB_VEICULO and TB_ORIGEM.
Sometimes I get hotel names or channel names that are not registered in these tables. With that, I have to manually register and reimport the file generating a lot of work.
How do I generate a select that brings me all hotel names + all channels and compare with the tables already registered in order to identify new hotels and channels and send them by email ?
Everything in TB_ARQUIVO in the fields HOTEL_NOME, SEGMENT, COMMUNICATION, ORIGIN and VEHICLE and does not exist in TB_HOTEL, TB_SEGMENTO, TB_COMUNICACACAO, TB_VEICULO and TB_ORIGEM must be sent by e-mail.
Someone knows a simple way to do this ?
Take a look here: https://stackoverflow.com/questions/173041/not-in-vs-not-exists
– Denis
You can use this to slectionar those that do not exist, now about email you have to describe what possibilities you have in hand, how the program would need to work, what your environment, etc
– Denis
Note. i I get several emails using Interop of outlook is very simple.
– Denis
https://stackoverflow.com/questions/11223462/how-to-send-a-mail-using-microsoft-office-interop-outlook-mailitem-by-specifying .
– Denis