Viewing 15 posts - 1,516 through 1,530 (of 2,171 total)
One option is to add a column and store the depth there. When you have that, it is very easy to add a new child!
Just select the parent, get the depth,...
N 56°04'39.16"
E 12°55'05.25"
July 14, 2007 at 12:38 pm
I "think" he has one table for each year...
N 56°04'39.16"
E 12°55'05.25"
July 14, 2007 at 12:36 pm
All previous solutions assume that SerialNumber is sequential.
Have a look at these solutions
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=85913
N 56°04'39.16"
E 12°55'05.25"
July 14, 2007 at 7:31 am
You can write a function that gets all the salary months for you and combine them.
N 56°04'39.16"
E 12°55'05.25"
July 14, 2007 at 7:27 am
Also, WEEK is the most vague time period/interval available in SQL Server.
What is a week? Do you mean ISO week calculation? Ledger week? Week in month?
Always when dealing with week,...
N 56°04'39.16"
E 12°55'05.25"
July 13, 2007 at 1:16 pm
I hope this will help you
-- create sample data
declare @sample table (rundate datetime)
insert N 56°04'39.16"
E 12°55'05.25"
July 13, 2007 at 1:06 pm
SELECT *, dbo.ufn_GetDaysInMonth(ColX) FROM Table1
N 56°04'39.16"
E 12°55'05.25"
July 12, 2007 at 1:52 pm
This would be easier
RETURN
DATEPART(DAY, DATEADD(MONTH, DATEDIFF N 56°04'39.16"
E 12°55'05.25"
July 12, 2007 at 1:50 pm
Yes, and what is your problem now? The error message has explained to you what is wrong.
You haven't given us more information to work with and until you do, you're...
N 56°04'39.16"
E 12°55'05.25"
July 11, 2007 at 12:49 am
July 10, 2007 at 5:43 am
SELECT Funder, Start_date, End_date, Client_NHI, FMISCode FROM (SELECT Funder, Start_date, End_date, Client_NHI, FMISCode, ROW_NUMBER() OVER (PARTITION BY Client_NHI ORDER BY Patient_ID) AS RecID, ROW_NUMBER() OVER (PARTITION BY Client_NHI ORDER BY...
N 56°04'39.16"
E 12°55'05.25"
July 10, 2007 at 12:12 am
With SQL Server 2005, this must be even faster since you can make the computed column persisted!
N 56°04'39.16"
E 12°55'05.25"
July 9, 2007 at 12:10 pm
dbo.fnNoTime(dtSomeDate) BETWEEN '1/1/2007' AND '1/31/2007'
dtSomeDate >= '1/1/2007' AND dtSomeDate < '2/1/2007'
This utilize any index present and do a index seek, instead of an table scan.
N 56°04'39.16"
E 12°55'05.25"
July 9, 2007 at 4:57 am
Yes, we understand you now.
But you still haven't answered the question of how you define the order of records. In a relational database, the order of records can not be...
N 56°04'39.16"
E 12°55'05.25"
July 9, 2007 at 4:51 am
And you still claim Jeff's query won't work?
SELECT Client_NHI, MIN(Start_Date) AS StartDate, MAX(End_Date) AS EndDate
FROM yourtable
GROUP BY Client_NHI
SELECT Client_NHI, MIN(Start_Date) AS StartDate, MAX(Start_Date) AS EndDate
FROM yourtable
GROUP...
N 56°04'39.16"
E 12°55'05.25"
July 8, 2007 at 3:55 pm
Viewing 15 posts - 1,516 through 1,530 (of 2,171 total)