SQL ExcelSQL Excel

Freeware Excel Add-In - Simplify data retrieval from SQL Server, Oracle, Sybase, MySQL, DB2, Firebird and any other ODBC compliant database

SQL Excel Support
Welcome, Guest
Please Login or Register.    Lost Password?
Query using cells from Excel cells (1 viewing) (1) Guest
Please post here about SQL Excel useage within Excel. Excel / VBA type topics should go in there. Thanks.
Go to bottom Post Reply Favoured: 0
TOPIC: Query using cells from Excel cells
#226
Lorifan (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Query using cells from Excel cells 5 Months, 3 Weeks ago Karma: 1  
Hi there,

I have been using your freeware for twa month and I love it !

I am quite sure to know the answer to my question : not possible' but I would like to be sure.

Is it possible to use cells from Excel in a query ?

A very easy instance:

QUOTE:

SELECT first_name, last_name, date_of_birth
FROM people
WHERE date_of_birth > A1


Where A1 = 2008-01-01 is an Excel cell.



Second question, is it possible to use stored procedures in your freeware ?

Many thanks.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#227
admin (Admin)
Admin
Posts: 175
graph
User Online Now Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months, 3 Weeks ago Karma: 1  
hi Lorifan
Thanks very much. Glad it is working fine for you.

You cant do that with this addin but I am pretty sure you can with the DB Addin. It is a free addin built by Roland. Please take a look here http://dbaddin.sourceforge.net/


Roland is a member here and if he sees this he might be back with more detail but there is very good documention here http://dbaddin.sourceforge.net/HelpFrameset.htm

Also, you could do what you want via VBA but there would be no point really if it is already in DB Addin.

Hope that makes sense.

Thanks a million for signing up and for the kind feedback.

Al
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#228
admin (Admin)
Admin
Posts: 175
graph
User Online Now Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months, 3 Weeks ago Karma: 1  
hi again ! Sorry, I missed your second question earlier and just caught it there.

At the moment you can't use stored procedures. You could use them in an earlier version but were disabled when I tried to lock the addin down so it was only possible to run SELECT statements. As the Stored Procedure could be an Action query I disabled them.

They will be enabled again in one of the next releases..

Hope that is ok. Thanks again and have a nice night. Al
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#231
Lorifan (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months, 2 Weeks ago Karma: 1  
Thanks for your answer.

I know this forum is specific to another addin but as Roland is a member here, he might help me (or anyone else). (and I could not find a forum specific to DB Addin)

When I try to set-up the connection, I get a successful connection at the test but then there is nothing in the 'Columns': no Table, no Column...

When I go under 'Creation', I can write and execute a query with no problem.

I tried to use DB function but I always have #NAME Error. When I build the query through MS query, MS query is able to do the query but I still gety the #NAME error in excel and a blank instead of the data.

My connection string is

Provider=SQLOLEDB.1;Password=***;Persist Security Info=True;User ID=***;Initial Catalog=****;Data Source=***


Thanks
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/07/25 08:53 By Lorifan.
  The administrator has disabled public write access.
#232
admin (Admin)
Admin
Posts: 175
graph
User Online Now Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months, 2 Weeks ago Karma: 1  
Hi Lorifan !
Hope the weekend is going great.

I am sorry but am not familiar with the details of DB Addin. I am going to ask Roland if he can help you out with more information on that.

Thanks, Al
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#234
roland (User)
Junior Boarder
Posts: 27
graphgraph
User Offline Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months, 1 Week ago Karma: 2  
Hi Al, hi Lorifan!

First I need to know whether you have "DBaddin.Functions" listed in Tools/Add-Ins...
If not, then maybe try to install DB-Addin again (administrator rights!!) and start the "addDBAddinToAutomationAddins.xls" during the installation process (or later using the entry in start/programs), this adds the DBAddin.Functions COM automation server to the Excel Addins list. If that doesn't work, you might also try to search the automation server for yourself, using the "Automation.." button in the Tools/Add-Ins dialog.

The #Name error indicates that DB-Addin hans't been installed correctly. You should also see a Toolbar after correct installation, the Help (Question Mark) button should bring up a small "About" dialog with a short overview and further links to information. The version indicated there should be 1.2.1 as of the current download.

Concerning your original question, yes it's possible indeed using textual concatenation of queries. There are several supporting functions to format datetime and string values correctly for use with SQL (as datetime values are just decimal numbers in Excel).

-hope that helps & regards,
ROland
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#236
Lorifan (User)
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months, 1 Week ago Karma: 1  
Yeepee ! It is working great. I did not add DBaddin to AutomationAddins, it is now done.

Many thanks to both of you !
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#238
admin (Admin)
Admin
Posts: 175
graph
User Online Now Click here to see the profile of this user
Re:Query using cells from Excel cells 5 Months ago Karma: 1  
Thats great its working fine.

Thanks vm Roland for sorting that out.

Have a nice weekend !
Al
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/08/02 16:42 By admin.
  The administrator has disabled public write access.
Go to top Post Reply
Thanks for using the forum SQL Excel Freeware Add-inget the latest posts directly to your desktop

Google Translate

Copyright SQL Excel, 2007-2008 | valid xhtml? | valid CSS? |Microsoft ® and Microsoft Excel ® are registered trademarks of Microsoft Corporation