Questions tagged [ms-query]

Microsoft Query is a program for retrieving data from external sources into other Microsoft Office programs — in particular, Microsoft Excel

Microsoft Query is a program for bringing data from external sources into other Microsoft Office programs — in particular, Microsoft Excel. By using Query to retrieve data from your corporate databases and files, you don't have to retype the data you want to analyze in Excel. You can also update your Excel reports and summaries automatically from the original source database whenever the database is updated with new information.

Types of databases that you can access

You can retrieve data from several types of databases, including Microsoft Office Access, Microsoft SQL Server, and Microsoft SQL Server OLAP Services. You can also retrieve data from Excel workbooks and from text files.

Microsoft Office provides drivers that you can use to retrieve data from the following data sources:

  • Microsoft SQL Server Analysis Services (OLAP provider)
  • Microsoft Office Access
  • dBASE
  • Microsoft FoxPro
  • Microsoft Office Excel
  • Oracle
  • Paradox
  • Text file databases
170 questions
0
votes
2 answers

SUM of DISTINCT in Microsoft Query

I have a query that returns data somewhat like this: REF01 10 50 1 REF01 10 50 1 REF01 20 40 1 REF01 20 40 1 REF01 30 30 2 REF02 40 20 1 REF02 50 10 2 REF02 50 10 2 And I need it to return it like this: REF01 60 …
user7393973
  • 2,270
  • 1
  • 20
  • 58
0
votes
2 answers

I have a query that does 2 sums, and then the first will subtract the second, but in some cases the second is null

I have a query (in MS-Query, MSQRY32.EXE) that does 2 sums, and then the first will subtract the second, but in some cases the second is null, how do I go over this? (Sum(CASE WHEN m.mcdmv=11 THEN m.mqtd END)- Sum(CASE WHEN m.mcdmv=12 THEN m.mqtd…
Totty.js
  • 15,563
  • 31
  • 103
  • 175
0
votes
2 answers

How to improve CASE WHEN statement to return result on same line

Currently working on some SQL script from a OpenEdge progress database. At the moment i am trying to return time for an event based on if it was Estimated or Actual. This can be identified via a result in a column. The problem i get is the way the…
Jack Williams
  • 141
  • 1
  • 1
  • 15
0
votes
0 answers

Cannot input parameters in SQL code for MS query

I'm creating an Excel report, which other users beside myself could manage. At the moment I'm struggling with creating the parameters in MS Query, so that they would get the input from a cell in Excel. Everytime I try to paste my code, where I…
Jaanis Veinberg
  • 143
  • 1
  • 7
0
votes
1 answer

The specified field [Report].[Field] could refer to more than one table listed in the FROM clause of your SQL statement

I am creating a report based on a query in Microsoft Access, and I keep receiving an error message when switching from Design View to Report view. The specified field '[Customer Report].[Need Date]' could refer to more than one table listed in…
travelbug928
  • 25
  • 10
0
votes
0 answers

Could not add table 'SELECT('

Error given when adding query that runs in SQL developer but not in MS Query. Seems to not like my nested query. Code I am using: SELECT ORDER_DATE ,SALES_ORDER_NO ,CUSTOMER_PO_NUMBER ,DELIVER_TO ,STATUS ,ITEM_NUMBER …
Raven
  • 11
  • 3
0
votes
1 answer

Running Excel refresh all from USB drive

I have an Access database and an Excel file with some charts & pivots linked to it, and I want to put them on a USB stick so anyone can update and view the data. I have some VBA in the Access file which rewrites the Excel connection strings to the…
0
votes
1 answer

Optimize run speed on for next loops vba

TLDR: I'm trying to make this macro run faster. Macro overview: Refresh a query tied to an order database. The query refreshes a month's worth of data in about 9 seconds. A filter is used to copy only values from the selected DateVal and copies it…
Matt Cottrill
  • 152
  • 1
  • 1
  • 15
0
votes
1 answer

Extract hourly data from process data base with excel and ms query

I am quite new using SQL and in that specific case MS query. I have to extract data from a factory database where data are recorded every 5-7 seconds, using excel and ms query. To be able to complete my analysis, I have to use one year set of data.…
Makol76
  • 21
  • 3
0
votes
0 answers

Excel / MS Query = How to show `loading` while it loads new data with parameter change

Im using Excel + MS Query to load data from database. This query includes some parameters, however since the complex queries takes a few secs to process. I wonder if there is a way to show loading while it loads new data with parameter change?…
Raheel Hasan
  • 5,753
  • 4
  • 39
  • 70
0
votes
1 answer

ODBC MS Query date parameter

I would appropriate any help with the following issue. I got an MS Query for dates. When i am trying to list records using a criteria, it works if I type the value directly, but if I am trying to use =[] as a parameter to type, then I got the popup…
bontoo
  • 137
  • 1
  • 19
0
votes
0 answers

Getting the nth occurence of a word between delimiters in MS Query

Is there a way to find a word between delimiters in Microsoft Query? For example find "this", which is the 3rd word between underscores in "what_could_this_be". For reference, in MySQL I would have done it by SUBSTRING_INDEX(SUBSTRING_INDEX(field, '…
LWC
  • 1,084
  • 1
  • 10
  • 28
0
votes
0 answers

Excel: Read .dbf file from microsoft query (other sources)

Enviroment: Microsoft Office 2010, Windows 10 I can not obtain this external data from my .dbf file using Microsoft Query, maybe my data source is incorrectly configured but I tried all the drivers that could handle this format, for example "Driver…
Ing Angel Lopez
  • 107
  • 1
  • 8
0
votes
0 answers

Microsoft Query syntax to extract domains from subdomains

If your table has a row like: sub.test.com test.com foo.bar.co.nz hey.co.uk www.stackoverflow.com Then what do you put in your SELECT SQL syntax to get just pure domains in Excel: test.com test.com bar.co.nz hey.co.uk stackoverflow.com ? In other…
LWC
  • 1,084
  • 1
  • 10
  • 28
0
votes
1 answer

Filter query from Combo Box (is Null and Is not null)

I have a combo box that I have set with Null and is Not null options, after slecting the query I want the user to define the query filter from the combo box so I can identify the missing Drawings How do I then apply a user filter to the query…
mupton
  • 13
  • 3