Viewing 15 posts - 571 through 585 (of 1,439 total)
Using Jeff Modens splitter here
http://www.sqlservercentral.com/articles/Tally+Table/72993/
SELECT level
FROM #myTable
ORDER BY (SELECT CAST(Item+1000 AS VARCHAR(10))+'/' AS "text()"
FROM dbo.DelimitedSplit8K(level,'.')
...
June 14, 2012 at 3:48 am
Here's another to try
DECLARE @t TABLE(attribute_nameVARCHAR(10),attribute_value VARCHAR(10))
INSERT INTO @T(attribute_name,attribute_value)
SELECT 'SIZE','L' UNION ALL
SELECT 'SIZE','S' UNION ALL
SELECT 'COLOR','Black';
SELECT CAST('<' + attribute_name + '>' + attribute_value + '</' + attribute_name + '>' AS...
June 11, 2012 at 8:24 am
ankita.vinculum (6/11/2012)
Hi,Thanks for your solution, it works for me.
Can u please elaborate that what is the meaning or purpose of "COLLATE Latin1_General_BIN".
Regards,
Ankita
Here is a good place to start
http://msdn.microsoft.com/en-us/library/aa174903%28SQL.80%29.aspx
Your...
June 11, 2012 at 4:46 am
Try using a binary collation
REPLACE(value COLLATE Latin1_General_BIN,'Æ',CHAR(13)+CHAR(10))
June 11, 2012 at 4:22 am
It looks like my_sp_WriteStringToFile is saving the file using unicode instead of ansi. If you can't change it, try removing the 'encoding="UTF-8"' from the header.
June 11, 2012 at 3:25 am
All a bit unclear....
WITH Data AS (
SELECT name
FROM (VALUES ('Banana'),('Clementime'),
('Apples'),('Appricots'),
...
June 1, 2012 at 9:33 am
This assumes AccountVersion is contiguous
WITH CTE AS (
SELECT AccountID, AccountVersion, IsActive,
ROW_NUMBER() OVER(PARTITION BY AccountID ORDER BY AccountVersion DESC) AS rn1,
...
May 30, 2012 at 5:51 am
dwain.c (5/24/2012)
Mark-101232 (5/24/2012)
WITH CTE AS (
SELECT row.value('local-name(.)', 'VARCHAR(50)') AS name
,row.value('text()[1]', 'VARCHAR(50)') AS...
May 25, 2012 at 2:06 am
Lynn Pettis (5/24/2012)
May 24, 2012 at 2:56 pm
R.P.Rozema (5/24/2012)
May 24, 2012 at 8:18 am
Try this, I can't see a simpler way with the XML as is.
WITH CTE AS (
SELECT row.value('local-name(.)', 'VARCHAR(50)') AS name
,row.value('text()[1]', 'VARCHAR(50)') AS val
...
May 24, 2012 at 2:34 am
You can also use preceding-sibling for this
select p.p.value('1+count(for $a in . return $a/../*[. << $a])','int') as parentID,
p.p.value('@name','varchar(10)') as parentName,
c.c.value('1+count(for $a in . return $a/../*[....
May 23, 2012 at 4:22 am
shaunna (5/22/2012)
The records are not always one minute apart,...
May 23, 2012 at 2:20 am
SELECT a.StoreGroup,a.Store
FROM StoreGroup a
WHERE EXISTS (SELECT * FROM StoreGroup b WHERE b.Store=a.Store AND b.StoreGroup<>a.StoreGroup)
ORDER BY a.Store,a.StoreGroup
May 22, 2012 at 2:08 am
Viewing 15 posts - 571 through 585 (of 1,439 total)