Viewing 14 posts - 1 through 14 (of 14 total)
Thanks Craig. It will take some time to understand the cursor part. I haven't worked on cursors too much, in fact negligible.
April 12, 2011 at 12:57 pm
Yes Craig.. These Schedules are dynamic and can vary in future
April 8, 2011 at 9:42 am
Here are the scripts...
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ScheduleTest]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ScheduleTest](
[StationName] [nvarchar](255) NULL,
[ScheduleNumber] [nvarchar](255) NULL,
[ArrivalTime] [nvarchar](20) NULL,
[DepartureTime] [nvarchar](20) NULL
) ON [PRIMARY]
END
GO
--Insert...
April 8, 2011 at 9:41 am
Thanks Craig.
I will build a script tomorrow and will post it again.
April 7, 2011 at 10:54 pm
Sorry for not tracking this on weekends.!
Thanks to all for putting views but I think I am still far from an answer.
In order to get an INDEX SEEK you frequently...
May 3, 2010 at 1:27 am
It's from 1st May to 2nd May.
and even if I add some more columns and include it in my Select list, Sql Server still goes for Table Scan
May 1, 2010 at 2:56 pm
I had a similar requirement. I handled it through a Stored Procedure.. and was calliing the same from a .Net application.
May be this can help you. I hope I...
April 29, 2010 at 2:52 am
hi here below is query
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[usp_Test_Reports]
@intYear int
as
Declare @intIncidentCategoryID int;
Declare @chvIncidentCategory varchar(50);
Declare @intIncidentModeID int;
Declare @chvIncidentMode varchar(50);
Declare @chvCTIncCat nvarchar(4000)
Declare @chvCTIncMode nvarchar(4000)
Declare @chvCreateTable nvarchar(4000)
Declare @chvTableName nvarchar(10);
Declare...
May 23, 2009 at 10:30 am
hi Ramesh,
i did changes according u
but still showing me same error
here is below the changes i did in my query
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
CREATE PROCEDURE [HSI].[usp_MonthlyEPCHazardousSpillReport_2]
(
@month int,
@year...
May 19, 2009 at 9:02 am
hi Ramesh,
i did changes according u
but still showing me same error
here is below the changes i did in my query
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
CREATE PROCEDURE [HSI].[usp_MonthlyEPCHazardousSpillReport_2]
(
@month int,
@year...
May 19, 2009 at 9:01 am
hi ramesh ,
here below is SP which is am try to create
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
CREATE PROCEDURE [HSI].[usp_MonthlyEPCHazardousSpillReport_2]
@month int,
@year int
WITH Months
AS
(
SELECT 'January' AS [Month] UNION...
May 19, 2009 at 8:38 am
HI ramesh,
this Query i try to put in Stored Procedure , but give mr following error
Msg 195, Level 15, State 1, Procedure usp_MonthlyEPCHazardousSpillReport_2, Line 27
'Months' is not a recognized option.
Msg...
May 19, 2009 at 8:13 am
HI ramesh ,
Really thanks , it working fine now!
🙂
Thanks
kunal
May 19, 2009 at 5:23 am
Hi thanks for reply,
here below is my query
declare
@year int,
@month int
set @year=2009
set @month=4
SELECT
IncidentMode,
Count(IncidentMode) AS ModeCount,
DATEPART (yy,CreatedDate) as CurrentModeYear,
CASE
WHEN DATEPART (mm,CreatedDate) = 3 THEN 'March'
WHEN DATEPART (mm,CreatedDate) = 4 THEN 'April'
END
AS...
May 19, 2009 at 4:24 am
Viewing 14 posts - 1 through 14 (of 14 total)