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
1
vote
3 answers

Query to stuff duplicate records in SQL Server?

I have this table: +----------+----------+---------+-----------------------------------+ | Class A | Class B | Class C | Result_XML | +----------+----------+---------+-----------------------------------+ | SUPER |…
Nomdeplume
  • 15
  • 4
1
vote
2 answers

old data when refreshing a pivot table linked to a ms query with a parameter

So I have a ms query with a parameter (let's call it "qry_Accounting") and I linked this parameter to a field that is linked to a combobox. This way I can filter my data with the combobox. I then created a Pivot Table based on the ms query.…
Ben corr
  • 21
  • 4
1
vote
1 answer

Change Column location of SQL statement in Excel

Within excel I have connected my Microsoft SQL Server database to it, to display results. The system I have set in place is built off of a form. If a user chooses option 1, the query results will show: Select person, car, house from mytable1 If the…
Brad
  • 1,450
  • 2
  • 16
  • 37
1
vote
0 answers

Excel Microsoft Query Multiple Values Parameters, Bad Parameter type

I'm using office 365. In excel I import data from Microsoft Query. My problem is that I want to have multiple values in parameter (range) (like a IN condition), I'm only able to get the parameter from cell for only a single value. Sample…
Shank
  • 1,387
  • 11
  • 32
1
vote
1 answer

MS Query Excel iif expression syntax error

I’m using MS Query in Excel to execute the following query: select iif(egachid <>'GCAJA0', True, False) from fgledg where egcono='1'and egdivi='D30'and egvono=51166554 I have a tabel, fgledg, that contains a column, egchid. For a specific voucher…
Lily
  • 9
  • 6
1
vote
1 answer

Get the last entry on LEFT JOIN a table

I have a query SELECT cm.posted_at, s.id, s.name, s.device, co.status, co.last_seen, d.device_id FROM station s LEFT JOIN chat_online co ON s.id = co.station_id AND s.device = co.device_id LEFT JOIN device d ON s.device=d.id LEFT JOIN…
Ashith
  • 309
  • 1
  • 3
  • 17
1
vote
1 answer

MS QUERY/SQL Subquery Syntax

I've a feeling the answer to this question is straight forward enough but my SQL knowledge is very basic so please bear with me! I use an Excel spreadsheet to keep track of orders for my milk delivery business. I have the spreadsheet setup as a…
1
vote
1 answer

How to sort a concatenated field in MS-Access 2013 Query

I have two concatenated fields in a ms-access query, The fields are: [FirstName] & " " & [LastName], and I want to sort them by last name. How do I sort them like this? Thanks.
user5544694
1
vote
0 answers

Pass excel Column/cell range to a MySQL/ MS query as parameter

I have a MySQL query which in which I have to pass excel cells/columns as parameter. i.e Select * from employee where name=? and joining_date=? The above query has to pick the two parameters from cells in two columns name & joining_date from sheet 1…
Kush
  • 35
  • 5
1
vote
1 answer

Using an Excel VBA-defined variable as an "IN" statement of SQL command text

I am trying to pass a variable into the command text of a SQL Query in my VBA code, but keep running into a "Type mismatch" error. I have written a simple equation in my spreadsheet that re-creates the syntax of an IN statement and I just want to…
A.J
  • 71
  • 2
  • 9
1
vote
1 answer

Embedded MS Query connection in Excel

The original task I had was to combine two worksheets dynamically. I discovered Microsoft Query lets me do it by building queries to pull data from the worksheets. However, the data connection stored in the file has references to my local computer.…
lala
  • 83
  • 2
  • 9
1
vote
1 answer

Excel ACE.OLEDB: COUNTIF equivalent in query

I developed the following Microsoft Query in ACE.OLEDB: SELECT Name, Country (SELECT COUNT(*) FROM Table1 as T1 WHERE Name = T.Name AND Country = T.Country AND Description="Work" GROUP BY Name, Country) /…
AnalystCave.com
  • 4,884
  • 2
  • 22
  • 30
1
vote
1 answer

Transform and Pivot in Excel - MS Query

I have 4 field in my table : NO. | Specification | Specification Value | Description 1 Color Blue a 1 Size 6" a 2 Color Red b 2 Size …
jraic
  • 53
  • 1
  • 11
1
vote
1 answer

I am getting an error that the expression in my Access Query is too complex

SELECT dbo_job.job_date, dbo_job.job, dbo_job.suffix, dbo_job.item, qry_SumCost.SumMatlPlan, qry_SumCost.SumMatlAct, ([qty_released]*[fixovhd_rate])/[pcs_per_lbr_hr] AS lbr_cost_plan, …
DarthVoid
  • 604
  • 3
  • 9
  • 21
1
vote
0 answers

Excel 2007/MS Query Using 1 table to filter another, partial matching

I have a table of BOMs (Bill of materials). A customer sends me a list of parts and I want to have Excel filter the table to just display those boms, but our part number contains REVs, the customer's entry does not. Is there an easy way to filter…
1 2
3
11 12