Viewing 15 posts - 286 through 300 (of 1,438 total)
tim.oliver (9/11/2013)
September 11, 2013 at 7:35 am
SET DATEFORMAT DMY;
DECLARE @t TABLE(Grp CHAR(2), dt Date);
INSERT INTO @t(Grp,dt)
VALUES
('00' , '28-10-2012'),
('10' , '29-10-2012'),
('10' , '28-10-2012'),
('10' , '28-10-2012'),
('20' , '30-10-2012'),
('20' , '05-11-2012'),
('20' , '10-11-2012'),
('20' , '30-10-2012'),
('30' , '12-11-2012');
SELECT t.Grp,
...
September 11, 2013 at 6:28 am
September 9, 2013 at 9:21 am
Probably not the best way, but seems to work
SELECT DISTINCT
Grp_A, Grp_B, Grp_C,
SUM(Val_A) OVER(PARTITION BY Grp_A, Grp_B,...
September 9, 2013 at 4:37 am
Here's another
WITH CTE AS (
SELECT
r.RequestId
,q.QuoteId
,r.EmailAddress
,q.CreatedAt
,CASE
WHEN...
September 5, 2013 at 7:19 am
Sean Lange (9/4/2013)
September 5, 2013 at 6:38 am
SELECT t1.CustomerName AS Customer,
STUFF((SELECT ',' + t2.Status AS "text()"
FROM dbo.Customers t2
...
September 5, 2013 at 1:56 am
the recursive Cte take the fist record and process it further with the rest of the Data's found in xml, is it right ?
Yep, correct.
and then why is the not...
September 4, 2013 at 8:00 am
Try this
WITH Source AS (
SELECT d.id,
CAST (d.DetVal AS XML) AS DetVal,
d.Detid,
...
September 4, 2013 at 6:34 am
Try this
DECLARE @x XML = '
<feed xmlns:im="http://itunes.apple.com/rss" xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<id>https://itunes.apple.com/AU/rss/topalbums/limit=10/xml</id>
<title>iTunes Store: Top Albums</title>
<entry>
<updated>2013-08-28T03:55:45-07:00</updated>
<title>Paradise Valley -...
August 28, 2013 at 6:26 am
Is there some significance in 'AA' in Danish/Norwegian? It seems to sort after 'Z'
SELECT X
FROM (VALUES ('A'),('AA'),('B'),('BB'),('C'),('CC'),('Z')) T(X)
ORDER BY X COLLATE Latin1_General_CI_AS
SELECT X
FROM (VALUES ('A'),('AA'),('B'),('BB'),('C'),('CC'),('Z')) T(X)
ORDER BY X COLLATE Danish_Norwegian_CS_AS
August 28, 2013 at 4:35 am
SELECT c.AddressID,
c.AddressOptin,
c.CustomerID,
(
SELECT...
August 15, 2013 at 1:50 am
WITH CTE AS (
SELECT AgentID, ExcepCodeDetailName, Detail_Start_Time, Detail_End_Time,
ROW_NUMBER() OVER(PARTITION BY AgentID ORDER BY Detail_Start_Time) AS rn
FROM @testing)
SELECT AgentID, ExcepCodeDetailName, Detail_Start_Time, Detail_End_Time
FROM...
August 14, 2013 at 2:03 am
Clumsy but appears to work
SELECT t1.Lvl,t1.Level1_pk_id,t1.Level2_pk_id,t1.Level3_pk_id
FROM #Temp t1
WHERE NOT EXISTS(SELECT * FROM #Temp t2
...
August 12, 2013 at 5:58 am
Viewing 15 posts - 286 through 300 (of 1,438 total)