Viewing 15 posts - 2,881 through 2,895 (of 5,588 total)
reported as spam
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 8:49 pm
Does this work for you?
;WITH CTE AS
(
select DISTINCT DocNo, CreatedAt, Notetitle
from dbo.test
)
SELECT *,
stuff((SELECT ',' + NoteText
...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 6:28 pm
Craig Farrell (10/13/2010)
Heh, glad I ducked this one Wayne. http://www.sqlservercentral.com/Forums/Topic1003666-338-1.aspxI think you were kinder then I would be at the end there.
:hehe:
Which begs the question... how would you have been...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 6:21 pm
GilaMonster (10/13/2010)
WayneS (10/13/2010)
I got all of them on sqlblogs.com, and a few others, but I know I'm still missing a lot.
Start reading....
They're all linked in the comments of that...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 6:17 pm
Nick123-481228 (10/13/2010)
This is equity price table and it contains many combination and it would be very hard to give all cases.
You can imagine that we are storing 100,00...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 4:26 pm
Your specification is now changed. In http://www.sqlservercentral.com/Forums/FindPost1003800.aspx, you say it should be one value, now you're saying a different thing. Please give detailed specification of what you need.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 3:38 pm
mark - is respect to what Craig said earlier:
Craig Farrell (10/13/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 1:38 pm
Does this do it for you?
if OBJECT_ID('tempdb..#CardHistory') IS NOT NULL DROP TABLE #CardHistory;
Create Table #CardHistory
(
SerialNo INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, -- a CLUSTERED INDEX is REQUIRED!
ModificationDatetime DATETIME DEFAULT GETDATE(),
OldCardNo...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 1:34 pm
Tom.Thomson (10/13/2010)
Trey Staker (10/13/2010)
Shawn Melton (10/13/2010)
How about this one as a response.:-)Very appropriate response from Gail...I might steal that one sometime. "Measure don't assume" Love it.
It would...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 12:54 pm
harjeet_21 (10/13/2010)
Hi,I need some help to write a query using SQL Server 2005. Consider a table "CardHistory"
Create Table CardHistory
(
SerialNo INT IDENTITY(1,1),
ModificationDatetime DATETIME,
OldCardNo INT,
NewCardNo INT
)
Please post sample data, in the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 12:39 pm
Check out the link in my signature for common date/time routines. You'll also need to use a case statement to handle whether the current month is January for which routine...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 12:36 pm
Sacheen (10/13/2010)
I am not sure if this is possible via a single query.. anybody knows any superior way to find the expected result?
But of course... superior ways to achieve expected...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 12:31 pm
You need to look at the MIN, MAX and COUNT functions, as well as the GROUP BY clause of the SELECT statement.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 12:05 pm
GilaMonster (10/13/2010)
Not from here, but how's this one:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=151492
Background is that he mailed me twice within 10 min, subject line 'Answer this' and just a link to that thread.
:crazy::crying::pinch:
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 12:00 pm
markpruett_02 (10/13/2010)
ABC NULL NULL NULL NULL
NULL DEF NULL ...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
October 13, 2010 at 11:51 am
Viewing 15 posts - 2,881 through 2,895 (of 5,588 total)