Viewing 15 posts - 166 through 180 (of 242 total)
Example of recursive common table expression (CTE) to display multiple levels of recursion is given below.
USE AdventureWorks;
GO
WITH DirectReports(ManagerID, EmployeeID, EmployeeLevel) AS
(
SELECT ManagerID, EmployeeID, 0...
July 11, 2008 at 6:21 am
Hi Ramesh,
Read BOL for the exact info.
A common table expression (CTE) provides the significant advantage of being able to reference itself, thereby creating a recursive CTE. A recursive CTE is...
July 11, 2008 at 6:18 am
Hey Vinoth,
Try this:-
DECLARE @Date datetime
SET @Date = '07/11/2008'
SET @Date = DateAdd(mm,6,@Date)
SELECT @Date Date
July 11, 2008 at 1:14 am
Hi,
Why are you creating stored procedure for this?
Instead you can create script like:
IF DB_ID('Database1') IS NOT NULL
DROP DATABASE Database1
GO
CREATE DATABASE Database1
GO
CREATE TABLE Database1.dbo.Table1(id int)
CREATE TABLE Database1.dbo.Table2(id int)
GO
IF DB_ID('Database2') IS NOT...
July 11, 2008 at 12:49 am
Since the format of new_table is determined by evaluating the expressions in the select list, I am not sure Indexes will be maintained in new_table.
You need to create the indexes...
July 10, 2008 at 11:57 pm
Hi
The SELECT INTO statement creates a new table and populates it with the result set of the SELECT statement. SELECT INTO can be used to combine data from several tables...
July 10, 2008 at 11:48 pm
DECLARE @T TABLE (ID INT)
INSERT INTO @T
SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT -1 UNION ALL
SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT -1
SELECT MIN(ID) MinVal...
July 10, 2008 at 11:39 pm
Hi Madam Curie,
No problem at all. In a Stored Procedre, scope of Temp. Table is only inside the procedure. Outside of procedure, Temp Table will not exist.
One more thing, every...
July 10, 2008 at 11:05 pm
Hi Pzmrcd ,
I think you are talking about subscription of reports.
First of all you need to deploy the report at reportserver.
After Deployment, you can schedule the report at reportserver using...
July 10, 2008 at 1:34 am
Hi Venm,
First of all you need to create a Temporary Table and insert the result of Stored Procedure in that table. Now you can use this table in WHERE...
July 9, 2008 at 11:27 pm
Hi Sanuj,
First of all check for the tables which has field EmployeeID:
SELECT O.Name TableName,C.Name ColumnName From sys.Objects O
INNER JOIN sys.Columns C ON C.OBJECT_ID=O.OBJECT_ID
WHERE C.NAME LIKE 'EmployeeID' AND type_desc='USER_TABLE'
Now you can...
July 9, 2008 at 11:21 pm
You can show the reports using .NET also.
See this article for some examples:
July 9, 2008 at 8:20 am
Hi Aysegul,
You can Deploy the Reports and access the reports using IE browser
After deploying reports just type "http://ServerName/reports" in IE 6.0 or later version and view the reports.
July 9, 2008 at 8:14 am
Its simple to achieve.
You need to create one more parameter for your second reports.
Pass the field value of orderID to navigated report.
Also you need to change Query/Procedure of your second...
July 7, 2008 at 7:52 am
I think you are talking about Drill through reports.
First you need to create that report where you want to navigate from current report.
After completion of that report, just click on...
July 7, 2008 at 7:21 am
Viewing 15 posts - 166 through 180 (of 242 total)