Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Just how accurate are the SQL Strings generated by Excel?

Status
Not open for further replies.

Varja

MIS
Aug 11, 1999
3
US
I noted many questions that have referred to SQL as a possible answer. I asked a question when I first logged in tonight concerning how I might compare 2 dates/times to get a third field called 'elapsed time'. Currently Some of my co workers do this kind of calculation in Excel. Lehtoant stated that Excel could be used to create the long strings and then cut/paste them into the SQL. I am really just learning about all this so please forgive me if this is an obvious answer. Does Excel use the same SQL language to do it's work, and if so how compatible is it with Access?<br>
If they are very compatible many of my problems would be solved!! <br>
<br>
I would like to take time to thank all of the great members that help out here. When someone is willing to help point you in the right direction it really means a lot. Thank guys!!
 
You said that you are "just learning about all this" so let me cover some basics. Forgive me if you already know this.<br>
<br>
Access is a desktop relational database management system (RDBMS). That is, you use it to define & populate "tables" of data. Tables can be joined together via common/key fields. Structured Query Language (SQL) is the data definition and manipulation language that is used for all relational databases (not just Access). You can use SQL to write queries that retrieve data from one or more tables. SQL can handle very complex queries.<br>
<br>
Excel is a self-contained spreadsheet tool. It has it's own macro language - Visual Basic for Applications (VBA) - and built in functions.<br>
<br>
An Excel worksheet can be "linked" to a table in an Access database. To make this work, a third product - MS Query - is used build SQL statements that retrieve data from the Access table and return it to Excel.<br>
<br>
<br>
So, to answer your question: SQL can only be used to solve your problem if the underlying data is in an Access database. If the data is native to Excel, use Excel functions and/or VBA.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top