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
1 answer

MSSQL - 2 Tables with multiple rows merge in one table

I have 2 selects which returns 2 tables, in each table I have 12 rows, and 2 column, now I want to have just one table. ---- First Table select f. date as Date, f.value as Month1 from ( select b.date as date,…
Dan Paschevici
  • 961
  • 2
  • 10
  • 22
0
votes
1 answer

How do I prevent removing duplicate records from my Access query results?

The Data I'm working in MS Access 2013. I have two tables ('Import' and 'Import-Pay'). I have a query that combines data from the two. Import-Pay contains transaction data from a client, which includes the occasional duplicate transaction record…
TMY
  • 471
  • 1
  • 7
  • 20
0
votes
1 answer

Error when separately summing two columns

I have two tables, SHPORD and CUSTORD, and I want to get the sum of uncompleted units for all orders that have not yet been fulfilled through today. Example at bottom. Separate queries look like this: SELECT SHPORD.ITEM,…
mmak
  • 3
  • 3
0
votes
2 answers

Query to Count values from different columns

I am looking for a query than can work in Access that gives me the total count of users who completed certain requirements. I know I can group by column, the "tricky" part is that I need to group in one column if the user completed any of the…
chupeman
  • 1,095
  • 3
  • 11
  • 23
0
votes
1 answer

MS Access use table field as query criteria

I have a question. Is it possible to use a table as a query criteria to count how many items in another table? I have two tables. Table 1 is the query criteria. Table 2 is a table with many data. I'd like to have a new table or insert into an…
Webster H.
  • 35
  • 1
  • 11
0
votes
1 answer

Using field alias in MSQuery does not work with DB2

This query works in data studio, but fails to show alias in MS Query! I have tried different types such as "",'',[] and even https://support.microsoft.com/en-us/kb/298955 SELECT 'TRANIN'AS NAME, SUM(CASE WHEN ALT3.TRANINDT BETWEEN 20150603 AND…
Mooody80
  • 15
  • 3
0
votes
1 answer

SQL query lookup 2 values from another table

I have 3 tables: 1) JCTransactions Job CostCode Date Amount 36801-001 01-150 1/8/2015 55.00 36801-001 02-240 2/6/2015 26.00 2) JCCostCode Job CostCode Description 36801-001 01-000 …
martin
  • 1
  • 2
0
votes
1 answer

Opening a report - time taken

I have a query that I timed takes 25 seconds to run (data from the cloud). When I run a report based on this query using DoCmd.OpenReport strReport, acPreview, , strWhere it takes twice as long. Is this normal, or is there something I should be…
Glib Gibon
  • 39
  • 9
0
votes
0 answers

MS Access - How can I sum all of the records of one field and use that sum in a calculation in another field?

MS Access query question - I am making a query to calculate the price of a finished good. To do so, the equation is ((sum of material cost)+(labor cost))/completed finished goods). The problem is that I need to first sum the material cost of each of…
DarthVoid
  • 604
  • 3
  • 9
  • 21
0
votes
2 answers

Issues with Temporary Tables in SQL query via Excel / MS Query

I have a SQL query via a MS Query connection into Excel that includes a temporary table. Code: CREATE TABLE #PV (ProductID varchar(255), Price int); INSERT INTO #PV(ProductID, Price) SELECT DISTINCT PLR.ProductID, MAX(PLR.normal_price) …
J-BAC
  • 13
  • 6
0
votes
1 answer

MSQuery ReadWithCompletion error

I am following the code set up in the example here: http://azure.microsoft.com/en-us/documentation/articles/mobile-services-ios-how-to-use-client-library/#selecting What I am trying to do is query a database I have set up on Azure and check if there…
0
votes
1 answer

VBA If textbox is empty display all values

I have 2 textboxes and a button. The button opens a query with the values of the textboxes. Everything works fine, except when one textbox is empty then I want to find all the records from that textbox(So far I've tested it on textbox2). Here is my…
Renet
  • 339
  • 6
  • 13
0
votes
1 answer

How to use temporary tables in MS Query in Excel?

How to use temporary tables in MS Query in Excel? The queries is showing up okay in the preview, but then it is not inserted into the spreadsheet correctly.
user3853657
  • 239
  • 4
  • 13
0
votes
1 answer

MS Query 14 to use data in excel sheet as part of query

We have a student MIS running on SQL Server 2012. We have multiple spreadsheets extracting data through ODBC connections. The query is generated in MS Query 2014. I would like to feed criteria into the Query from a cell in an Excel sheet as the…
0
votes
2 answers

What is Subqueries syntax for Microsoft Query?

I am trying to do a simple subquery join in Microsoft Query, but I cannot figure out the syntax. I also cannot find any documentation for the syntax. How would I write the following query in Microsoft Query? SELECT * FROM ( SELECT Col1, Col2 …
Kuyenda
  • 4,529
  • 11
  • 46
  • 64