Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!
EXEC ( 'SELECT a.DEPT_CODE, a.PROC_CODE, aa.INSURANCE, aa.FSC, aa.PATIENT_TP, aa.PTP, c.UNIT_PRICE, a.QTY, a.REV INTO ##tblMXPROFIT_CASH_CON1TEST FROM ' + @DB + '_vwMX_TRANS a INNER JOIN ' + @DB + '_vwMX_HEAD aa ON a.ACCT_NO = aa.ACCT_NO LEFT JOIN #tmp c ON a.DEPT_CODE = c.DEPT_CODE AND a.PROC_CODE = c.PROC_CODE ORDER BY aa.INSURANCE, aa.FSC, aa.PATIENT_TP, aa.PTP ' )
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.