Viewing 15 posts - 391 through 405 (of 2,007 total)
ramsai1973 (12/7/2012)
I have a table called 'Weeks' which has two columns namely:
1. ID (Primary Key, Auto Indexed, DataType: int)
2. WeekStartDate (DataType: date)
The WeekStartDate column contain dates falling on...
December 7, 2012 at 3:43 am
jbon007 (11/29/2012)
i've updated the script if others get stuck to a similar problem
SELECT a.Coding_Source, ad.Admit_Date, dd.Disch_Date, pn.Patient_No, w.Ward, ed.Episode_Date,
ROW_NUMBER() OVER(Partition by en.Episode_Number ORDER BY en.Episode_Number)...
December 7, 2012 at 2:54 am
Finally finish coding up the php infrastructure for my blog, then start blogging!
December 7, 2012 at 2:38 am
Sample data and expected results based on the sample data would be useful. See this article --> http://www.sqlservercentral.com/articles/Best+Practices/61537/%5B/url%5D, for help on how best to post sample data.
December 7, 2012 at 2:36 am
I'm going to guess that the problem is your XML.
Let's take a look at the XML formatted to be readable: -
<Root>
<Node FirstName="Andrew" LastName="Fuller" Email="afuller@contoso.com" Phone="(205) 555 - 9898"...
December 7, 2012 at 2:21 am
Jeff Moden (12/6/2012)
December 7, 2012 at 2:12 am
The only bug I'm aware of that did something like this was fixed in SQL Server 2005 SP3 CU3 and was never a problem in SQL Server 2008R2 - I'll...
December 6, 2012 at 6:20 am
george.greiner (12/5/2012)
Cadavre (12/5/2012)
george.greiner (12/5/2012)
December 5, 2012 at 8:51 am
george.greiner (12/5/2012)
December 5, 2012 at 6:37 am
I agree with Anthony, a calendar table is the way to go.
If you can't create a calendar table for whatever reason, a slower way to solve the issue would be...
December 5, 2012 at 4:15 am
memymasta (12/3/2012)
A followup question: if i only need the years span of 2000-2050, how do i select them instead of
SELECT TOP 97199 ROW_NUMBER() OVER(ORDER BY (SELECT NULL)) FROM CTE5Thanks
Well,...
December 3, 2012 at 9:33 am
Sachin 80451 (12/3/2012)
Fantastic thank you
No problem. Do you understand how it works?
December 3, 2012 at 4:48 am
CREATE TABLE #yourTempTable([MonthName] VARCHAR(9), [Year] INT);
WITH CTE(N) AS (SELECT 1 FROM (SELECT 1 UNION ALL SELECT 1)a(N)),
CTE2(N) AS (SELECT 1 FROM CTE x CROSS JOIN CTE y),
CTE3(N) AS (SELECT 1...
December 3, 2012 at 4:38 am
kl25 (11/30/2012)
To follow-up my earlier suggestion, note that Cadavre's approach uses a tally table. A calendar table is a specialized version of a tally table.
In fact, my CTE tally...
November 30, 2012 at 9:10 am
Not currently at my desk so the syntax might need correcting, but could you do something like this?
WITH CTE(N) AS (SELECT 1 FROM (VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1))a(N)),
CTE2(N) AS (SELECT 1 FROM CTE x...
November 30, 2012 at 8:56 am
Viewing 15 posts - 391 through 405 (of 2,007 total)