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
0 answers

Best way to insert into MS-Access Relational Database with Query

let's assume we have a Relational DB in MS-Access(image). Where We have 4 Tables and columns related to tables which are related to one another. I know we can insert like: INSERT INTO Project ( ProjectName, ProjectID, FK_Employee, FK_Department ) …
0
votes
2 answers

Insert foreign key with and without Null value

I have a relational database in MS Access which contains 4 tables: dummyTable, Table1, Table2, Table3. dummyTable holds the foreign keys of others. Now, for inserting, I am using the query: INSERT INTO dummyTable (Col1, Col2, Col3, FK_Table1ID,…
0
votes
1 answer

Syntax for DISTINCT query on one column in MS Query

I have an Excel spreadsheet which I use as a relational database for my milk round. I query this database using MS Query in Excel (Mac 2011 Version) to generate my delivery routes. One of the columns is the customer address and I'd like to have this…
0
votes
2 answers

SQL in Microsoft Query to join 4 selects and sum results in one column

I have an Excel table with this data: Micro |Group | Series|Group1 |Series1|Group2|Series2|Group3|Series3| 1 |Back | 3 |Biceps | 1 |Delts | 1 |Traps | 1 | 1 |Chest | 4 |Triceps| 2 |Delts | 2 | | | 1 …
Jonha
  • 13
  • 4
0
votes
1 answer

access 2016 append multifield to one field

[![enter image description here][1]][1]good day to you all. I have a table with some field like attached file T_Jadwal2.jpg. https://i.stack.imgur.com/mPuBg.jpg I need the the table insert to other table with the difference way format like…
0
votes
1 answer

Replace certain positions in a field with XXXX in select microsoft SQL

Dear Stackoverflow members, I have a field in a database BH90ABBB01010215529101 How do i amend it to replace the 9th to 16th characters with X BH90ABBBXXXXXXXX29101
ahmed
  • 45
  • 7
0
votes
1 answer

How to remove duplicates and unwanted rows

So I have a "Sample", "Test" and "Result" table linked to each other from a database and I am trying to pull information using MS Query. Each sample has one test and each test could have roughly 20 results entered by different people attached to it.…
potterwiz
  • 17
  • 6
0
votes
2 answers

How to only pull a row once from MS Query

So I have a "Sample", "Test" and "Result" table linked to each other from a database and I am trying to pull information using MS Query. Each sample has one test and each test could have roughly 20 results entered by different people attached to it.…
potterwiz
  • 17
  • 6
0
votes
2 answers

MS Query with comma separated parameters

How to make MS Query work with comma separated parameters in Excel cell? My query is: SELECT * FROM ABC WHERE Id in (?) When I put id number for example "1" the query works, but I want to put into a parameters cell a few id's 1, 2, 3, 4 etc, but…
0
votes
0 answers

sql multiplying a sum

I'm struggling with the below code. i'm trying to work out the total balance of a folio by using its total charges and total payments. i'm almost there, however with the below code the payments is incorrect, it seems to be multiplying the total sum…
BWILLIAMS
  • 1
  • 1
0
votes
1 answer

Merge top few rows and promote them as Headers

I am importing an Excel data extract into MSQuery using ODBC which has data that appears as below: Col1 Col2 Col3 Col4 Col5 Col6 Col7 Col8 Col9 Col10 …
sifar
  • 1,086
  • 1
  • 17
  • 43
0
votes
1 answer

Oracle inline view column alias only working before joining tables and not when joining to tables

I have a query that looks somewhat like this: select ..., my_view.alias_name from tbl1 join tbl2 on tbl1.key = tbl2.key join tbl3 on tbl3.key = tbl3.key join ( select ..., (max(...) keep (...)) alias_name …
user7393973
  • 2,270
  • 1
  • 20
  • 58
0
votes
3 answers

"Column not found" error when using "left" "mid" or "Substr" in MS Query

and thanks in advance for any help. I'm using Microsoft Query to interrogate Sage 50 tables. I'm trying to create a user defined field containing only the first digit of a customer account reference. I have been able to achieve this result when…
Steve
  • 1
0
votes
2 answers

How to "fetch first 1 row only" per IDs in 3 different columns?

I am attempting to fetch 1 row only based on unique set of IDs in another 3 columns. In my database, there are many records per date for each of a unique set of IDs in the other 3 columns (you can imagine product numbers for instance). The stock…
Zdenda
  • 69
  • 7
0
votes
0 answers

Join tables from different servers in Oracle - Microsoft Query

I'm using Microsoft Query and I want to connect tables from two different servers. One uses Oracle in OraClient11g_home1 and the other MySQL ODBC 5.1 Driver. Both have DSN setup, a different user and password, one with data source name and the other…
user7393973
  • 2,270
  • 1
  • 20
  • 58