Questions tagged [microsoft-query]

MS Query (Microsoft Query) - an application that scans, selects and organizes the data from the database.

49 questions
6
votes
1 answer

Oracle SQL: Pivot on multiple columns/fields

I want to create a table where the entries of various columns are 'pivoted' to column headers. The table is for reporting purposes - my users want to query data via Excel (using Microsoft Query), and the problem is that doing the pivoting in Excel…
Chris7b
  • 167
  • 1
  • 3
  • 8
2
votes
0 answers

How can I pass a list parameter to an ODBC query in Excel (Microsoft Query)

I'm having some trouble passing a particular type of parameter from an Excel cell value to an ODBC query. It's a DB2 database on an AS400 server, and I'm using the iSeries Access ODBC Driver from IBM. Here is the query with hard-coded…
2
votes
3 answers

SQL Group Row Selection

Hi I have the following query to get all of the pricing out of my system. I need to have all of these selections grouped and then I need to select the 2nd newest date to get the prior day pricing. The problem is that the prior day pricing isn't…
jeffpro
  • 21
  • 2
2
votes
0 answers

Excel how to define connection on the current workbook

I'm trying to run SQL queries in Excel. The only option that allows me to do so is inserting data from an external source with Microsoft Query, selecting Excel Files as the data source and pointing at the current workbook. Stupid as it is, it…
Tyrel
  • 81
  • 5
2
votes
2 answers

Query to write extra rows in Excel output

I'm trying to accomplish something that seems like it should be straightforward in MS Excel. I want to use a single SQL query - so I can pass it on to others to copy and paste - though I know the following could be achieved with other methods as…
mr.adam
  • 241
  • 2
  • 12
1
vote
0 answers

SQL Server "No column name was specified" - But it was

I have a query that runs in SQL Server (using Visual Studio 19), but when I try to run it using Microsoft Query in Excel, I get the error "No column name was specified for column 5 of 'bv'. "No column name was specified for column 6 of 'bv'. "No…
Scott
  • 3,663
  • 8
  • 33
  • 56
1
vote
1 answer

Connecting to database via RDP using VBA

I would like to know if anyone can help me with a rather specific problem. Currently I have a range of Excel workbooks which are connected to Epicor via Microsoft Query, the problem I have is that Epicor is stored on a remote server so I am having…
Ctee
  • 11
  • 2
1
vote
0 answers

Importing SQLite3 data into Excel 2010 (via Microsoft Query and ODBC driver)

I'm trying to load SQLite3 database data into Microsoft Excel 2010 x32 via Microsoft Query (in Microsoft Windows 10 x64 Creators Update 1703). I downloaded and installed the SQLite ODBC Driver 0.9996 from http://ch-werner.de/sqliteodbc/. Microsoft…
bairog
  • 3,143
  • 6
  • 36
  • 54
1
vote
0 answers

Excel Microsoft Query, query vertica issues

I'm trying to query vertica db from excel, I can query simple SQL statements fine, but if I want to do more complex queries I run into trouble. I have altered the macro I have but I am being confused on why they are separating the connection part…
excelguy
  • 1,574
  • 6
  • 33
  • 67
1
vote
1 answer

SQL sum, multiple Group By's and Date criteria

I'm looking to perform a sum calculation on a SQL table to find the quantity of a particular stock item held against a particular salesperson up to and including a specific date. I'm able to perform the sum function to find the quantities on a…
Peter Connolly
  • 121
  • 1
  • 1
  • 8
1
vote
2 answers

excel mysql not reading all select statement

I create an ODBC connection to query a MySQL database direct from an Excel file. It is a quite complex query with aprox 60 select statements that works perfect both on the original MySQL database and connecting from Microsoft Query. However when I…
Luis Urea
  • 107
  • 3
  • 12
1
vote
1 answer

Excel Data Connection - Unrecognized Database Format

I have a data connection in several Excel documents that share the same source file on a shared network. If one user opens the source file and another user attempts to refresh the data connection, the query fails and displays an Unrecognized…
CJK
  • 99
  • 7
  • 20
1
vote
1 answer

Excel Microsoft Query function to retrieve user name

I have created microsoft query data connection which links to another spreadheet. In my sql query I need to filter out the lines that does not bellong to that user. To do so i am using where clouse and i need to compare the field to the current…
Laura Ruby
  • 61
  • 1
  • 1
  • 3
1
vote
2 answers

How can I select this in Microsoft Query?

I have a stored procedure and a simple table. I need to join this two object then allow user to see the result using Microsoft Query in Excel. This is what I have. The Exec SP_Budget create global temp table and fill ##tmpBudget exec…
BobNoobGuy
  • 1,551
  • 2
  • 30
  • 62
0
votes
0 answers

How to make MS Query Parameters (?) OPTIONAL for usage (want to start with all data first AND THEN filter if needed)

I am pulling SQL data into Excel through Microsoft Query. I have set of 2 ? parameters for a set of sales data to filter by store # and by item, and I want them to be able to be used as alternative filter options, not necessarily both at the same…
LaChelle
  • 11
  • 1
1
2 3 4