Google Answers Logo
View Question
 
Q: Multiple SQL queries ( No Answer,   3 Comments )
Question  
Subject: Multiple SQL queries
Category: Computers > Programming
Asked by: mapes-ga
List Price: $15.00
Posted: 25 Apr 2006 05:24 PDT
Expires: 25 May 2006 05:24 PDT
Question ID: 722577
Our customer database sits in a MS SQL database.  Every couple of
weeks I have to query the database to create an email list for our
email communications.  There are a number of variables that I change
each time I do the query, for example customer type, product type,
state, product status, etc.  Currently I do it by doing an excel query
however this is time consuming when you take into account remembering
all the small variables, de duplication and ensuring I get the correct
information.  For example if I forget a variable it takes time to
start again.  Is there a quicker and easier way I should be doing it?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Multiple SQL queries
From: the_big_z-ga on 25 Apr 2006 12:38 PDT
 
Depends on the amount of data we are talking about. There are
numberous ways to speed up a query including changing the parameters
to be more selective.
Subject: Re: Multiple SQL queries
From: nang_and_namoos-ga on 25 Apr 2006 13:15 PDT
 
DbVisualizer is a Java based tool (uses JDBC) to connect to different
types of databases and can be downloaded from here:

http://www.minq.se/products/dbvis/index.html

In this tool you can have variables in your sql query and when you
execute that query, it will prompt you to enter values for those
variables.

You can type the query one and save it as a bookmark in the tool - so
you don't have to retype it every couple of weeks. Also, you can save
the database connection information. So your weekly steps will be as
follows after the initial setup:

1. Open DbVisualizer
2. Connect to the customer database
3. Open bookmark editor and put the sql query in the sql editor
4. Execute query, enter values for variables
Subject: Re: Multiple SQL queries
From: pgmer6809-ga on 01 May 2006 13:29 PDT
 
You can put variables (they call then parameters) in EXCEL queries too.
I used to give parameters names that looked like questions. So instead
of parm1, or even "Zip Code" I would use "Enter Zip Code (Use ? for
Wild Cards)"
as the parameter name. Then when the user ran the query that is what
they saw as a prompt.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy