Viewing 15 posts - 331 through 345 (of 2,007 total)
davidsalazar01 (2/12/2013)
SELECT ParamValues.XMLProfile_TXT.value('.','VARCHAR(MAX)') AS DID
FROM Payment_Method_T (nolock)
OUTER APPLY XMLProfile_TXT.nodes('/div/ul/li/did') ParamValues(XMLProfile_TXT);
Msg 9506, Level 16, State 1, Line 1
The XMLDT method 'nodes'...
February 13, 2013 at 1:35 am
From the sample data provided by Lowell: -
-- SAMPLE DATA
IF object_id('tempdb..#yourTable') IS NOT NULL
BEGIN
DROP TABLE #yourTable;
END;
SELECT id, CAST(XMLProfile_TXT AS XML) AS XMLProfile_TXT
INTO #yourTable
FROM (VALUES(1, '<div class="MainMenu"><ul><li><did>Home</did></li><li><did>Tags</did></li><li><did>Articles</did></li><li><did>Editorials</did></li><li><did>Stairways</did></li>
<li><did>Forums</did></li><li><did>Scripts</did></li><li><did>Videos</did></li><li><did>Blogs</did></li><li><did>QotD</did></li>
<li><did...
February 12, 2013 at 7:15 am
davidsalazar01 (2/11/2013)
I'm trying to select XML data from one tag that is stored in an TEXT data type and can't seem to return the data I need.
e.g. XMLProfile_TXT field...
February 12, 2013 at 5:00 am
GordonLiddy (2/8/2013)
@Cadavre: What do you mean when you say "key that allows to see the start and end.."?
The table with the odd design...
February 8, 2013 at 5:03 am
mssqlsrv (2/7/2013)
Hi please find attachement.In picture Part.1 shows result of your query. & Part.2 shows result of my query
That looks suspiciously like white spaces. . . could you try this...
February 7, 2013 at 8:47 am
mssqlsrv (2/7/2013)
your query is working but i need values in...
February 7, 2013 at 7:19 am
It works here. . .
What is the result of this: -
DECLARE @DriveSpace AS TABLE(DriveLetter CHAR(1), FreeSpace VARCHAR(10));
DECLARE @DriveTemp AS TABLE(OutputInfo VARCHAR(MAX));
INSERT INTO @DriveSpace
EXEC master.dbo.xp_fixeddrives;
DECLARE curDriveLetters CURSOR FOR SELECT driveletter FROM...
February 7, 2013 at 6:06 am
I'm going to hope that your "odd" table has a key that allows you to see the start and end of each record, otherwise it is a disaster waiting to...
February 7, 2013 at 5:46 am
The simple answer is this: -
SELECT Drive, CAST(SUBSTRING(info, 32, 30) AS BIGINT) / 1024 / 1024
FROM @Drives
WHERE INFO LIKE 'Total # of bytes%'
ORDER BY drive;
Be aware that you are losing...
February 7, 2013 at 5:03 am
sumith1andonly1 (2/5/2013)
what will be the maximum value of Statistics Logins/sec?
42. 😛
February 5, 2013 at 3:16 am
Hello and welcome to SSC,
If you could knock up some sample data and DDL scripts, then your expected results based on the sample data provided that would be extremely useful...
February 4, 2013 at 9:45 am
Based on your sample data: -
IF object_id('tempdb..#yourTable') IS NOT NULL
BEGIN
DROP TABLE #yourTable;
END;
SELECT id, CAST(ItemId AS XML) AS ItemId
INTO #yourTable
FROM (VALUES(1, '<itemids><itemid>259</itemid><itemid>489</itemid></itemids>'),
...
February 4, 2013 at 8:38 am
Something like this?
--== SAMPLE DATA ==--
DECLARE @XML XML = '<YourXML><TheData value="3.100000000000e+003" /></YourXML>';
--== VIEW SAMPLE DATA==--
SELECT @XML;
/* Looks like this: -
<YourXML>
<TheData value="3.100000000000e+003" />
</YourXML>
*/
--==Convert from scientific notation==--
SELECT Data.value('(@value)[1]', 'REAL')
FROM @XML.nodes('./YourXML/TheData')...
February 4, 2013 at 6:50 am
MyDoggieJessie (1/31/2013)
SELECT ps.row_countFROM sys.indexes AS...
January 31, 2013 at 9:26 am
Lowell (1/31/2013)
January 31, 2013 at 9:14 am
Viewing 15 posts - 331 through 345 (of 2,007 total)