SQL Statements...where?

OfficeUser

Well-known Member
Joined
Feb 4, 2010
Messages
544
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Are SQL statements typically contained in the same area in an database? If so, where might be a good place to look? Thanks.
 
If you are using MSQuery from Excel, you can write SQL to pull data from Access. Such a query is not stored in Access but in Excel (or possibly in another DSN file that MSQuery uses).

I'm not a huge MSQuery user but it works okay once you get used to it.
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You shouldn't need to use SQL to pull data from Access to Excel using MS Query, but you can if you want/need to.

If there's an existing query/table in Access with the data you want you can choose that when you go through the Import process in Excel.
 
Upvote 0
The database used by just an Access database and I could use the the import database functions in Excel. Since it was redone and SQL is a part of it I lost that functionality without the use of statements. I could sound crazy but it is out of my league.
 
Upvote 0
Sorry but I don't see how SQL could have been introduced to a database.

What can't you do now that things have been 'redone'?
 
Upvote 0
Open Excel, Data, Import External Data, New Database Query. From there I would select my query and items I want to pull into Excel. But now with the new db I always get the message of something like 'Exception: too few parameters.'

If I close the screens until I get to to Microsoft Query and use the SQL button I enter something like:
[sp_rpts_enzymes_qry] 'wc14' then I click to return data to excel.
 
Upvote 0
That sounds to me like the Access database is connected in some way to SQL Server.
 
Upvote 0
That is correct. When it was redone it was done on an SQL server.
 
Upvote 0
then you should ask your sql server dba for a list o parameters of that stored procedure


or someone here could tell you how to instantiate an adodb command object and do a refresh on the parameters and that would tell you all the parameter names and types
 
Upvote 0
I am told he has to put it together. I am interested in how to find all the names and types.
 
Upvote 0
Joe4<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
I was reading through the forum and stumbled across this entry. Would you care to expound on this? I wasn't aware such a thing was possible...how exactly would you perform this action?<o:p></o:p>
Just start a new Macro, and select TransferSpreadsheet Action and fill in the appropriate arguments. Access tells you what to put in each one, and you can even press F1 for more detailed help.

Here is a more detailed write-up on the TransferSpreadsheet Action: http://msdn.microsoft.com/en-us/library/aa164087(office.10).aspx
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,287
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top