AS400 - Data downloading to Excel from AS400 table with multiple members - excel

I recently started a job at a company that still uses AS400 and need some help!
So currently we do not have any BI tool to access system data files directly, so I'm trying to connect AS400 to excel using ODBC and download/display AS400 data directly to excel.
So I accomplished to make the connection and I am able to access schema, table, views from Excel using data connection. But the problem is that some tables have multiple members in it and the excel's pulling data from what I am guessing as the first member that excel sees when all the important data are in other member files...
Is there anyway I could select specific members and download data of that specific member directly to excel?
I can do this when I use IBM's data transfer program, but I would like to find out if it's possible to do directly with excel..
Thanks!
Matt

No.
Multi-membered files are generally not supported by any SQL tool.
However
You can always CREATE ALIAS myname FOR MYLIB/MYTABLE(MYMBR)
Then use myname to access from Excel.

Download a file multiple members to excel
create a logical file over the physical file with all members. Download the logical file with excel data connection.
Hope this helps.

you can access the data in multi-member files via FTP. For example /QSYS.LIB/your_library.LIB/your_file.FILE will be considered a directly by FTP. Depending on the data structure you may be able to do it directly from Excel.

Related

Is there a way to use excel power query to query a SAS dataset on a local drive?

I've searched everywhere and can't seem to find an answer so hopefully someone here can assist. We have a SAS program set to run weekly that is outputting a dataset to a local drive. Is there a way to get excel Power Query to see it? I can connect to datassets fine that are housed within the database but stored locally is an issue. Outputting this to the database isn't an option for us. Any ideas?
If you have the Stored Process server you can create a web query to access it, as described here: https://www.rawsas.com/sas-as-a-service-an-easy-way-to-get-sas-into-excel-power-bi-and-000s-of-other-tools-languages/
This functionality also comes bundled with https://datacontroller.io (free for up to 10 users)
Disclosure - I wrote the blog and created the product.
Alternatives:
update your job to export your data as CSV or some other format that can be read natively by excel.
Use the IOM interface and VBA
SAS Addin for excel
All these options require server SAS. In short, there is no way that Excel Power Query can connect directly to a SAS dataset on a local drive, as the .sas7bdat format is a proprietary SAS format optimised for use by SAS.

SQL Server and Excel

I want to link an excel file to SQL Server 2014 whereby I can edit the file and the data gets updated on the server automatically.
Similar to what happens when you link sql server to Access whereas you can edit the data and the changes take effect in the server.
Thanks in advance
There is no out of the box solution for this. You can do this either of two ways:
Write a C# code which has a file watcher attached to the Excel file which uploads the Excel file using SSIS job to the database.
Create a scheduled SSIS job which imports the Excel file periodically.
Understanding the purpose would allow for greater elaboration.
This depends on the type of data you wish to edit.
For master data, if you have the Enterprise or Business Intelligence edition of SQL Server and Master Data Services set up, there is a plug-in for Excel:
https://msdn.microsoft.com/en-us/library/hh231024(v=sql.120).aspx
For transactional data, I would strongly advise against using Excel as a front-end and would recommend you to consider alternatives.
However, if you are compelled to go down this route, you can achieve this using VBA scripting and linking via a DAL (Data Access Layer) such as ADO.NET. Be aware that giving such power to your users could open up your system to sql injection attacks - only proceed so if you trust the users 100%. Another thing to take into consideration is validation checks - validation checks should be applied to every cell where data can be entered. More information can be found here:
https://support.microsoft.com/en-us/kb/316934

How to set up Access database as a back-end only

I plan on using Excel as the front-end and Access as the back-end only. (all queries and forms are in Excel). A single Access database will be queried from multiple Excel files that will be located on the share drive (Linux server). Access tables contain memo, text and number fields.
Data will be sent to Access tables and records will be appended/deleted; all via Excel.
There will be multiple users interacting with a single Access database via multiple Excel files located on the shared drive. Users will be interacting from different workstations with Windows 7, all have Access 2010 and Excel 2010 installed.
This process works for me from my workstation but I’m not sure what will happen when other 4 people will be sending/appending/deleting records to the same Database?
How do I make this work? What settings do I need to check in Access to make this possible?
Any advice will be greatly appreciated since I’m fairly new to Access.
Thank you!
Access is a file-server, and not a data-server.
That's means when you do a query on an Access database, all the data are going to the client part, who process the query.
Let a query "get the books written by Kernighan" in your Excel. Excel will ask to Access (throught the ADO or DAO) : "send me all the books". Access will send ALL the books, and Excel will find the book written by Kernighan.
In the same way, if Excel (still with ADO / DAO) want to make an update, it does it localy. The Access database will just set up a flag to prevent conflicts. (btw, this flag is stored in the .laccdb file)
In your case, all that are done by the ADO/DAO layer, which will
send all the data
set a flag to prevent the conflicts if one data is in Edit mode
So, to be short : yes, you can do it ;)

Windows Azure: importing data from Excel sheet?

I have a Windows Azure mobile service with a sql database.
I was wondering if it's possible to insert records from an excel sheet to an azure database table.
in other words, I have an excel sheet with many data records, I want to export the records to a database table.
is there any tool/service/SDK that provides this ?
I don't know of a tool that does that natively, but you can save your data in Excel as a CSV file, and use the BCP utility to load that data into any SQL database. Here is an older blog about the use of BCP with Azure SQL Database to get you started. If you are familiar with SSIS, you could import your data that way as well.
you could also try that that through SSMS normally (edit all rows and then just add it :-)) or use Access to connect to the front end?

SSRS: Error while querying data from an Excel file (through ODBC)

I am trying to render a simple chart using SSRS. The data is in an Excel sheet. I have set up an user DSN and created a data source in SSRS using ODBC.
I am able to query the excel in Data tab. However while trying to preview, I get the following error:
error [hy000] [microsoft] [odbc excel driver] the connection for
viewing your linked Microsoft Excel worksheet was lost.
Anyone knows why this is happening and how this can be solved?
I would consider creating a SQL Sever Integration Services package to import the data from Excel to a SQL database and using the database as the data source for the report. The SSIS package could be scheduled to periodically refresh the data.
Using a file based data source like Excel is vulnerable to people modifying the structure of the spreadsheet and moving, deleting or locking the file.
Seems to be a fleeting error. I deleted the dataset, created a new one and re-ran again. It worked.

Resources