Viewing 15 posts - 4,336 through 4,350 (of 10,143 total)
Check your connections. Could you be connected to two different versions of the db, in in VS, the other in SSMS?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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....
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 19, 2013 at 4:03 am
jerome.morris (7/19/2013)
Select * from dbo.DocketTB Where DatePart(Week,Docket_EngFinish ) = @weeknum
can...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 19, 2013 at 3:56 am
How are you executing this test batch, Jay? Are you using SSMS?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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'
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 18, 2013 at 6:43 am
John Mitchell-245523 (7/18/2013)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
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...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 18, 2013 at 5:42 am
What's returned from this, Jerome?
SELECT *
FROM dbo.DocketTB
WHERE Docket_EngFinish BETWEEN '20130708' AND '20131508'
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 18, 2013 at 5:38 am
jerome.morris (7/18/2013)
hmmm still no result even tho I no there is data in there for the time period
Post your query, Jerome.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 18, 2013 at 5:04 am
Viewing 15 posts - 4,336 through 4,350 (of 10,143 total)