I am working on the next update for StackQL.
One thing I want to do is the ability to request multiple issues. Therefore, when I downloaded the October data, for example, I did not delete the old September database. He is still there. In fact, you can even query it by including the database name as follows:
select top 10 * from SO_Sept09..Posts
This will be even more important as they begin to provide data for ServerFault and SuperUser.
But I do not like to have a whole bunch of databases to support this. I would rather put all the data in one database and split each separate set into its own schema. But to make this possible, I need to be able to set the default schema as part of the stored procedure that executes the request, based on the parameter passed to the stored procedure, which tells it which database the user selected from the drop-down list in the future for display on the toolbar.
Queries in StackQL are ultimately simply passed to the exec() function as follows:
exec(@QueryText)
Is there anything I can do in the stored procedure or add a QueryText (ala USE [DatabaseName] ) to the string to set the standard schema used in the query?
sql-server stored-procedures sql-server-2005 schema
Joel Coehoorn Oct. 15 '09 at 0:24 2009-10-15 00:24
source share