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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run SQL queries with 3rd party app from workstation w/o query analyzer

Status
Not open for further replies.

bmacbmac

IS-IT--Management
Jan 26, 2006
392
US
Hello,

There is a query I need a user to run each day. I don't want her to have query analyzer on her desktop with access to the database(s). Is there any sort of easy 3rd party app that I can load a pre-written query into for her to run each day?

This is to access a SQL 2000 database.

I am not a developer and can't create my own. Wondering if there is something easy I can pre-load and she just executes.

Thanks!

Brian
 
Do you want to automate this so that her machine runs the query on a schedule or do you want her to manually run it? Also... what is the purpose of running the query? Is there a report that she needs access to. Specifically, should this query return data for this person to see, or is this more of a maintenance thing?

Much of this can be handled by using Microsoft's command line utility, SQLCMD. This command line utility was distributed with SQL2005 but does work well with a SQL2000 database.

You can download it here:
Scroll down to:
Microsoft SQL Server 2005 Command Line Query Utility

If you want the user to see a report (the output of a query), you could use SQLCMD to output the data in a comma separated values file (.csv). CSV files can be opened directly by Excel.

Finally, you could write a batch file that runs the query, exports to csv, and opens Excel.

Make sense?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
is this SQL 2000 database on the local pc or on a different server?

Simi
 
George. SQLCMD is awesome! Thanks for the tip.
 
You're welcome.

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top