Viewing 15 posts - 5,971 through 5,985 (of 6,036 total)
Don't forget about OPENQUERY. It will help you access XLS sheets as normal tables or views without downloading it into temp tables.
Don't forget to add $ in the end...
September 6, 2005 at 4:37 pm
Your "Use ..." is out of scope. It works only within script you run via EXEC.
As soon as it's finished you are back to your original environment.
Add call for SP...
September 6, 2005 at 4:25 pm
Use this:
DECLARE @TName sysname, @IndId int, @Query varchar(4000)
DECLARE index_cursor CURSOR
FOR SELECT sysobjects.name, sysindexes.indid FROM sysobjects
Inner join sysindexes on sysobjects.id = sysindexes.id
where OBJECTPROPERTY(sysobjects.id, N'IsUserTable') = 1
and sysindexes.indid between 1 and 250
order...
September 6, 2005 at 3:58 pm
SELECT C.*
FROM dbo.Customer c
INNER JOIN (SELECT c2.CustID, (SELECT COUNT(*)
FROM dbo.Customer C1
WHERE C1.CustID <=C2.CustID) as Row_Numb
FROM dbo.Customer c2 ) C0 on C0.CustID =C.CustID
WHERE Row_Numb between August 30, 2005 at 4:21 pm
CREATE PROCEDURE dbo.MyProc @Script ntext
AS
......
GO
EXEC dbo.MyProc ''
and assign your SQL string to @Script inside SP.
August 30, 2005 at 3:55 pm
And "E4.EmpId <=E.EmpId" is priority for employees to be returned.
If you want another criteria choose another unique key for employees - join date, duration period on the job, etc.
August 1, 2005 at 7:08 pm
Try this:
SELECT *
FROM (select E1.EmpId, E1.EmpName, E2.ReportTo from Employee E1
inner join Employee E2 on E1.ReportTo = E2.EmpID
where E2.ReportTo IS NULL) TL
INNER JOIN Employee E on E.ReportTo = TL.EmpId
WHERE (SELECT COUNT(EmpId)
From...
July 31, 2005 at 11:43 pm
Indexed view is a table, in fact.
When you select data from indexed view you don't run the query because data is already prepared for selecting.
Query is being run every time...
May 12, 2005 at 7:56 pm
View is just a piece of code for retrieving data.
This code is compiled first time it's being used and is stored in database compiled until you change it.
Using view is...
May 11, 2005 at 6:42 pm
First and dummiest: single quote instead of double quote.
May 9, 2005 at 7:32 pm
When you press "Restore DB" EM runs set of queries searching for physical devises, last backups, etc.
8 queries in total.
Run profiler and find out which query causes your error.
Probably it's...
May 9, 2005 at 7:28 pm
0,1,2 -> /3 = 0
If you need to group weeks 1,2,3 then you need to substract 1 from those values.
If you need to group 2,3,4 then substract 2.
May 5, 2005 at 10:11 am
Viewing 15 posts - 5,971 through 5,985 (of 6,036 total)