Visual Integrator Export data from multiple company codes

SOLVED

I am tasked with exporting certain fields from our Sage 100 v2018 AP_Vendor table to a third party.  However the data needs to encompass all of our company codes.  Is there a way to do that within VI?

  • 0

    I would just use an Excel query for each company code.  Then, combine the data into one spreadsheet.  I don't think V/I can export data for more than one company.

  • +1 in reply to BShockley
    verified answer

    Thank you...I guess because data records are stored in separate tables based on Company, I can only access them one at a time.

  • 0 in reply to PRSpeed

    VI always overwrites the target file and so it will not append to it.  So even if you were to run the same export job from different companies, the target file will only contain data for the last company it was ran under.  You could set up a DSN for each company you need to export and then use Excel to query the data from each DSN into its own worksheet and then use PowerQuery to do a union join on each worksheet.  You could also do this with Access and use passthrough queries or linked tables but you would still need to set up a DSN for each company code or use a connection string that specifies the Company argument.  If you want to avoid the login prompts, you will need to include the UID and PWD arguments and if using Excel, will need to check the option to store the password in the connection string.  If you go this route, i recommend creating a sage 100 user specifically for querying data via ODBC and do not assign any roles to it that way its only purpose will be to authenticate via the ODBC driver.

  • 0 in reply to David Speck

    If it's a Premium / SQL system it would be easy... just write a SQL View with unions of the different company data into one source, then query that.

    In theory the same thing could be done with MS Access, but I'm not sure how well a union query would work with PTQ's.

    Or a VBScript to query the data through ODBC, looping through a company code list, building an output file with everything required.

  • 0 in reply to PRSpeed

    Several years back, we wrote a union query to combine tables from numerous Sage companies.  Worked with minimal troubleshooting.  Company wanted a consolidated AR Aging sent to them via Sage Alerts.  They were satisfied with the results.