Viewing 15 posts - 4,336 through 4,350 (of 10,144 total)
jerome.morris (7/19/2013)
July 19, 2013 at 5:59 am
Check your connections. Could you be connected to two different versions of the db, in in VS, the other in SSMS?
July 19, 2013 at 5:34 am
jerome.morris (7/19/2013)
Yes I do now find that strange considering I have data in there for last week?
You now get "no results for last week" from several queries which you've run....
July 19, 2013 at 5:25 am
jerome.morris (7/18/2013)
Hi Chris that returns data within them dates.Thanks
jerome.morris (7/19/2013)
(No column name)(No column name)2013-07-08 07:00:00.0002013-07-15 07:00:00.000
the rest of the data is empty
Jay
Don't you find this a little odd? If I...
July 19, 2013 at 4:41 am
Firstly, I wouldn't recommend embedding queries within your c# code, it makes it ten times harder to maintain, IMHO. Call views or stored procedures instead.
Secondly, your first post stipulates a...
July 19, 2013 at 4:14 am
jerome.morris (7/19/2013)
(No column name)(No column name)2013-07-08 07:00:00.0002013-07-15 07:00:00.000
the rest of the data is empty
Jay
The two dates displayed are the range start date and range end date variables.
SELECT @RangeStart, @RangeEnd
These...
July 19, 2013 at 4:03 am
jerome.morris (7/19/2013)
Select * from dbo.DocketTB Where DatePart(Week,Docket_EngFinish ) = @weeknum
can...
July 19, 2013 at 3:58 am
This batch:
DECLARE @RangeStart DATETIME, @RangeEnd DATETIME
SELECT
@RangeStart = x1.MondayLastWeek,
@RangeEnd = DATEADD(DD,7,x1.MondayLastWeek)
FROM (
SELECT MondayLastWeek = DATEADD(hh,7,CAST(CAST(DATEADD(DD,-((DATEDIFF(DD,0,GETDATE())%7)+7),GETDATE()) AS DATE) AS DATETIME))
) x1
SELECT @RangeStart, @RangeEnd
SELECT *
FROM dbo.DocketTB
WHERE Docket_EngFinish BETWEEN @RangeStart...
July 19, 2013 at 3:56 am
How are you executing this test batch, Jay? Are you using SSMS?
July 19, 2013 at 3:51 am
jerome.morris (7/18/2013)
Hi Chris that returns data within them dates.Thanks
Time to put this one to bed. Can you post up the results of this batch please?
DECLARE @RangeStart DATETIME, @RangeEnd DATETIME
SELECT
@RangeStart...
July 19, 2013 at 1:24 am
jerome.morris (7/18/2013)
The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.
Oops sorry my mistake:
SELECT *
FROM dbo.DocketTB
WHERE Docket_EngFinish BETWEEN '20130708' AND '20130715'
July 18, 2013 at 6:43 am
John Mitchell-245523 (7/18/2013)
July 18, 2013 at 6:38 am
Khalid Hanif-458693 (7/18/2013)
Dwain,Thanks for the great idea, instead of the computed column, I used the bigint column with all the values.
working like a charm with index seek.
Khalid, I'd be fascinated...
July 18, 2013 at 5:52 am
riya_dave (7/17/2013)
hii am creating script for non clustered ,
i need to see of particular index on column on particular table exists or not
Use object explorer in SSMS.
It's not usually as...
July 18, 2013 at 5:42 am
What's returned from this, Jerome?
SELECT *
FROM dbo.DocketTB
WHERE Docket_EngFinish BETWEEN '20130708' AND '20131508'
July 18, 2013 at 5:38 am
Viewing 15 posts - 4,336 through 4,350 (of 10,144 total)