Hey guys,
Whenever I want to design a report or program that involves the salespeople at my company, I have to run 2 separate append queries. This is because of how our point of sale system works. Attached is a snip of the main sales table from the ODBC.The circled columns are salesperson 1 and salesperson 2 (if the sale was split). The "DEL_DOC_NUM" shows the sale number. You can see that the first sale (and all of the items of it) are split between RR79130 and RA83560. As of now, if I want to build a report of of this, I have to run 2 append queries. 1 is everything you see in the pic, minus the 2nd salesperson column, and with a change to the PRC (price) columns multiplying them by IIF(SO_EMP_SLSP_CD2 is not null, .5, 1). I then run a second append query but remove salesperson 1 column, and use criteria "is not null" and salesperson 2 column. I use the same modifier on the price columns. I then run the rest of my queries off of that table.
I am just curious if there is a way, either with custom functions or something else I don't know of, to not have to do the 2 append queries any more? Some of our tables are enormous and the ODBC is based out of San Diego (I am in Dallas), so having to run 2 queries to the server can take quite a while.
This isn't a crisis or anything. Just hoping to learn something. Thanks guys
Snipe