SQL & Excel 2010 - sql

Good morning,
Does anyone know if there is an easy way I can use a SQL query in Excel to select specific data from an Excel spreadsheet without having to use VBA, Access, an SQL database or complicated Excel formula?
Thank you very much.

Use Microsoft Query.
I don't have Excel 2010 at the mo. In Excel 2007:
Ribbon: Data, From Other Sources (Get External Data From Other Sources), From Microsoft Query, Choose Data Source (dialog), Databases (tab), Excel File* (listbox), Select Workbook (dialog), browse for file, step through Query Wizard (dialog), at finish choose, View or edit query in Microsoft Query, click SQL (toolbar button) and there you can edit the query or change it entirely.

From a program you can use Jet SQL to query an Excel file.
From within Excel, I don't think you can use Jet SQL.

Related

Fetching Query Result Directly Into an Excel Cells

I am currently using Oracle Apex to write queries and copy and paste the results into an Excel file. I have also used mySQL Workbench in the past.
My question is it possible to link a database to Excel and produce the results? For example in cell A1 I would want to type "select sum(sales) from accounts" and when I click enter, the result would appear in that cell after fetching the query?
I may be over thinking it or expecting something that is not possible. Any help is appreciated
You can connect your excel with a database and pull the data to the sheet, but writing queries in an individual column still need to figure out. In between, you can take a look at the ODBC configuration to connect excel with the database, Hope this will give some insights.
https://www.devart.com/odbc/mysql/docs/excel.htm

how to import data from sql to excel and update sql data

for me user interface is excel sheet. so i want functionality such that i can import data from sql table.
and when i update data in excell sheet it shoul be update in sql table also.
can any one give me solution??
Similar questions have been asked. See this:
Two-Way Excel to SQL Connection
MS Access is a more appropriate tool for SQL Server connections, but if you have to use Excel then follow those links.
Hope that helps!

SQL Server 2012 to Excel 2010 Copy and Paste

I am trying to copy and paste from SQL Server 2012 to Excel 2010.
My query has the 13th column that is delimiting that is ruining the results.
It has a long description field that gets cut off after a space or a certain amount of characters.
It doesn't matter how big or small my order might be or how dumb my questions are, I get great service quickly. My account manager constantly comes through for me, and is the reason all of my purchasing inquiries start with blah
Please help.
I have tried the following methods
Tried saving without any delimiting to the Excel FIle
Changing the Query Results to add Quote Strings contianing list separators when saving .csv or copying result.
Your problem is that you have already used TextToColumn in this instance of Excel. Close Excel. Restart Excel. Execute the query in (I assume you mean) Sql Server Management Studio (AKA SSMS). Left-Click the square in the top left of the results to select all the rows in the query results windows. Then Right-click and select Copy With Headers. Then go back to Excel, select cell A1 and paste. The headers should take care of the column splitting.
Hth,
Ojf
Check if you are able to Export data using DTS Import Export Wizard of SQL SERVER 2012.
Try saving in both Excel(.xls) and Comma Separted file(.csv).

how to write SQL in EXCEL VBA with intelligence prompt

Please advice me how to input SQL statement in EXCEL VBA with intelligence prompt? for example, when i write select statement, system can auto prompt table field after i write a dot,just like i do it in sql server.

SSMS: query export to Excel

I am trying to export 260+ column query to Excel from SSMS 2005.
When I finish up the wizard, I get the "Too many fields defined" error.
Is there any way of getting around this?
I suppose I can run that query via New Query and copy and paste to Excel but it doesn't copy over the column names.
Thanks
This seems to be a problem of your version of Excel other than SQL Server. If you have Excel 2003 (or an older version), then you only have 256 columns, so you won't be able to "get around this". For Excel 2007+, you shouldn't have a problem at all. By the way, you can still select all records after you run your query, right-click in the results, and select "copy with headers" to get the column names.