How do you query (TSQL) report descriptions in SSRS 2008 R2? I have tried checking the tables under the ReportServer database, but I am not finding them there. The report description seems like something you would be able to query.
You can use the Description column in the Catalog table:
SELECT Path, Name, Description FROM ReportServer.dbo.Catalog
Related
I'm currently using a schema that will be changed to another schema in a couple of months. I do not not want to have to remove the SCHEMA_NAME multiple times from each report. All the reports so far have this format:
SELECT
COLUMN_NAME1,
SCHEMA_NAME.USER_DEFINED_FUNCTION(COLUMN_NAME2),
COLUMN_NAME3
FROM
SCHEMA_NAME.TABLE_NAME
I want to remove the schema name from the query so it looks like this:
SET SCHEMA LROUIM;
SET PATH LROUIM;
SELECT
COLUMN_NAME1,
USER_DEFINED_FUNCTION(COLUMN_NAME2),
COLUMN_NAME3
FROM
TABLE_NAME
I need the "SET SCHEMA" for the table name and "SET PATH" for the User Defined Function. This code works in Squirrel SQL, but if I insert this code into a Birt data set of type SQL SELECT QUERY, I get an error because of
SET SCHEMA LROUIM;
SET PATH LROUIM;
How do I implement SET SCHEMA and SET PATH in a SQL Select Query in Birt?
I think BIRT uses a JDBC connexion, and you can modify the connection parameters by specifying a default schema.
Is there a free web based tool (I prefer Microsoft because I have an MSDN account) to view the database schema and its properties? I'm currently using Visio but I dont know if it's possible in Visio to do the following:
View the database schema that I will upload in a Sharepoint workspace.
If I click the name of the Database table, it will either pop up a small window with its database properties and column description or another window will pop up with its database properties and column description.
For example I have a Schema table interface composed of a profile and time tables.
THESE ARE JUST EXAMPLES.
ProfileDim table
Profile ID number(10)
FirstName varchar (20)
MiddleName varchar (20)
LastName varchar (20) TimeDim Table
DateHired datetime---------------EmployeeStartDate datetime,
Date_Name nvarchar(50),
Year datetime,
If I click the name "TimeDim" it will take me to another page where I can see the database properties written below and the description of each column. I prefer not to use MS excel or word. I want a tool that I could edit, delete in case I want to add another column, change the data type and change the name etc.
TimeDim table
COLUMN NAME DATA TYPE ALLOW NULLS DESCRIPTION
EmployeeStartDate datetime, Unchecked "START DATE OF THE EMPLOYEE"
Date_Name nvarchar(50), Checked "CURRENT DATE NAME"
Year datetime, Checked "NAME OF THE CURRENT YEAR"
There are several tools that generate your database documentation to for example html. I don't know online tools but the generated docs can be placed online ofcourse. They are not free but you can use them in the evaluation perio to generate the database documentation
toad data modeler
dbdesc
dezign for databases
For Microsoft DB servers, you can use SQL Server Management Studio Express.
The DB schema management tool depends on which database software you are using. There are different tools to MySQL, PostgreSQL, Microsoft SQL Server, etc...
What I am trying to do is verify a URL. I just need to be able to select that single value from all databases that we have currently in SQL Server 2008. All the databases are the same, just multiple instances of the same database for different users.
I am looking to pull one item from one table in each database.
Each database contains a table SETTINGS and within that table a value for MapIconURL. I need that value from each table from within each database. I am looking at around 30 or so databases that would have this value.
So I found the "undocumented" Stored Proc sp_MsForEachDb and have working....to a point.
The code I am using is this:
EXEC sp_MsForEachDb 'use ?; SELECT "?" as databasename,SETTINGSKEYID, SECTION, NAME, INIVALUE, DESCRIPTION
FROM ?.dbo.SETTINGS
WHERE [NAME] = "MapIconURL"'
I have noticed that it is not selecting all the databases, but that it is also selecting the master table as well as other system tables, and am thinking that may be why it is not selecting all tables. Is there a way to exclude the system related tables?
If the number (and name) of the databases is fixed, then you could simply do:
SELECT MapIconUrl FROM db1.dbo.SETTINGS
UNION ALL
SELECT MapIconUrl FROM db2.dbo.SETTINGS
...
However, if either the number or names of the databases is not fixed, then you have to build the query dynamically.
First, run a query such as SELECT name FROM master..sysdatabases to get the names of the databases.
Then, loop over the result set (in T-SQL, use a CURSOR) and build your query and execute it (in T-SQL, use sp_executesql).
I am using SSRS 2008. My DBA won't allow me to use Stored Procedures. I am creating a data set and have to use the Query section. Can you use a Create Table type of query here?
IF so how?
There is a possibility to create a query from the temporary tables, but for that part of creating the table, there is no solution.
in the window for the query:
SELECT TOP 3 INTO #TempTable FROM someTable WHERE someTable.Id = 11091979
I am triying to fill a report with datatables. The report has two tables which are
he same but with diferent alias. In c# I create a datatable for one of them with the records that must be shown and another datatable with the other table info. Crystal only gets info from the first datatable to fill the two tables so the shown data is wrong. Can I fill the two tables that are the same but diferent alias with two diferent datatables?
This is the same problem that I wrote yesterday but simplier.
Thanks for all,
Crystal Reports does support duplicate tables with aliases.
The problem may be the link. If your trying to display the two tables on the report both there's no JOIN or WHERE statement.
The table would need a link with itself. Here's a link to a tutorial on join a table to itself
select * from tbl1 as child join tbl1 as parent on parent.primarykey = child.foreignkey;